xref: /PHP-5.5/sapi/apache_hooks/mod_php5.h (revision 73c1be26)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 5                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2015 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Author: Rasmus Lerdorf <rasmus@php.net>                              |
16    +----------------------------------------------------------------------+
17  */
18 /* $Id$ */
19 
20 #ifndef MOD_PHP5_H
21 #define MOD_PHP5_H
22 
23 #if !defined(WIN32) && !defined(WINNT)
24 #ifndef MODULE_VAR_EXPORT
25 #define MODULE_VAR_EXPORT
26 #endif
27 #endif
28 
29 typedef struct {
30 	long engine;
31 	long last_modified;
32 	long xbithack;
33 	long terminate_child;
34 	long setup_env;
35 	long current_hook;
36 	zend_bool in_request;
37 	zend_bool apache_config_loaded;
38 	zend_bool headers_sent;
39 } php_apache_info_struct;
40 
41 typedef struct _php_handler {
42     long type;
43     long stage;
44     char *name;
45 } php_handler;
46 
47 #define AP_HANDLER_TYPE_FILE 0
48 #define AP_HANDLER_TYPE_METHOD 1
49 
50 extern zend_module_entry apache_module_entry;
51 
52 #ifdef ZTS
53 extern int php_apache_info_id;
54 #define AP(v) TSRMG(php_apache_info_id, php_apache_info_struct *, v)
55 #else
56 extern php_apache_info_struct php_apache_info;
57 #define AP(v) (php_apache_info.v)
58 #endif
59 
60 /* defines for the various stages of the apache request */
61 #define AP_WAITING_FOR_REQUEST 0
62 #define AP_POST_READ 1
63 #define AP_URI_TRANS 2
64 #define AP_HEADER_PARSE 3
65 #define AP_ACCESS_CONTROL 4
66 #define AP_AUTHENTICATION 5
67 #define AP_AUTHORIZATION 6
68 #define AP_TYPE_CHECKING 7
69 #define AP_FIXUP 8
70 #define AP_RESPONSE 9
71 #define AP_LOGGING 10
72 #define AP_CLEANUP 11
73 
74 
75 /* fix for gcc4 visibility patch */
76 #ifndef PHP_WIN32
77 # undef MODULE_VAR_EXPORT
78 # define MODULE_VAR_EXPORT PHPAPI
79 #endif
80 
81 #endif							/* MOD_PHP5_H */
82 
83 /*
84  * Local variables:
85  * tab-width: 4
86  * c-basic-offset: 4
87  * End:
88  */
89