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: Zeev Suraski <zeev@zend.com> | |
16 | +----------------------------------------------------------------------+ |
17 | */ |
18 | |
19 | /* $Id$ */ |
20 | |
21 | #ifndef PHP_GLOBALS_H |
22 | #define PHP_GLOBALS_H |
23 | |
24 | #include "zend_globals.h" |
25 | |
26 | typedef struct _php_core_globals php_core_globals; |
27 | |
28 | #ifdef ZTS |
29 | # define PG(v) TSRMG(core_globals_id, php_core_globals *, v) |
30 | extern PHPAPI int core_globals_id; |
31 | #else |
32 | # define PG(v) (core_globals.v) |
33 | extern ZEND_API struct _php_core_globals core_globals; |
34 | #endif |
35 | |
36 | /* Error display modes */ |
37 | #define PHP_DISPLAY_ERRORS_STDOUT 1 |
38 | #define PHP_DISPLAY_ERRORS_STDERR 2 |
39 | |
40 | /* Track vars */ |
41 | #define TRACK_VARS_POST 0 |
42 | #define TRACK_VARS_GET 1 |
43 | #define TRACK_VARS_COOKIE 2 |
44 | #define TRACK_VARS_SERVER 3 |
45 | #define TRACK_VARS_ENV 4 |
46 | #define TRACK_VARS_FILES 5 |
47 | #define TRACK_VARS_REQUEST 6 |
48 | |
49 | struct _php_tick_function_entry; |
50 | |
51 | typedef struct _arg_separators { |
52 | char *output; |
53 | char *input; |
54 | } arg_separators; |
55 | |
56 | struct _php_core_globals { |
57 | zend_bool implicit_flush; |
58 | |
59 | long output_buffering; |
60 | |
61 | zend_bool sql_safe_mode; |
62 | zend_bool enable_dl; |
63 | |
64 | char *output_handler; |
65 | |
66 | char *unserialize_callback_func; |
67 | long serialize_precision; |
68 | |
69 | long memory_limit; |
70 | long max_input_time; |
71 | |
72 | zend_bool track_errors; |
73 | zend_bool display_errors; |
74 | zend_bool display_startup_errors; |
75 | zend_bool log_errors; |
76 | long log_errors_max_len; |
77 | zend_bool ignore_repeated_errors; |
78 | zend_bool ignore_repeated_source; |
79 | zend_bool report_memleaks; |
80 | char *error_log; |
81 | |
82 | char *doc_root; |
83 | char *user_dir; |
84 | char *include_path; |
85 | char *open_basedir; |
86 | char *extension_dir; |
87 | char *php_binary; |
88 | char *sys_temp_dir; |
89 | |
90 | char *upload_tmp_dir; |
91 | long upload_max_filesize; |
92 | |
93 | char *error_append_string; |
94 | char *error_prepend_string; |
95 | |
96 | char *auto_prepend_file; |
97 | char *auto_append_file; |
98 | |
99 | char *input_encoding; |
100 | char *internal_encoding; |
101 | char *output_encoding; |
102 | |
103 | arg_separators arg_separator; |
104 | |
105 | char *variables_order; |
106 | |
107 | HashTable rfc1867_protected_variables; |
108 | |
109 | short connection_status; |
110 | short ignore_user_abort; |
111 | |
112 | unsigned char ; |
113 | |
114 | zend_llist tick_functions; |
115 | |
116 | zval *http_globals[6]; |
117 | |
118 | zend_bool expose_php; |
119 | |
120 | zend_bool register_argc_argv; |
121 | zend_bool auto_globals_jit; |
122 | |
123 | char *docref_root; |
124 | char *docref_ext; |
125 | |
126 | zend_bool html_errors; |
127 | zend_bool xmlrpc_errors; |
128 | |
129 | long xmlrpc_error_number; |
130 | |
131 | zend_bool activated_auto_globals[8]; |
132 | |
133 | zend_bool modules_activated; |
134 | zend_bool file_uploads; |
135 | zend_bool during_request_startup; |
136 | zend_bool allow_url_fopen; |
137 | zend_bool enable_post_data_reading; |
138 | signed char always_populate_raw_post_data; |
139 | zend_bool report_zend_debug; |
140 | |
141 | int last_error_type; |
142 | char *last_error_message; |
143 | char *last_error_file; |
144 | int last_error_lineno; |
145 | |
146 | char *disable_functions; |
147 | char *disable_classes; |
148 | zend_bool allow_url_include; |
149 | zend_bool exit_on_timeout; |
150 | #ifdef PHP_WIN32 |
151 | zend_bool com_initialized; |
152 | #endif |
153 | long max_input_nesting_level; |
154 | long max_input_vars; |
155 | zend_bool in_user_include; |
156 | |
157 | char *user_ini_filename; |
158 | long user_ini_cache_ttl; |
159 | |
160 | char *request_order; |
161 | |
162 | zend_bool ; |
163 | char *mail_log; |
164 | |
165 | zend_bool in_error_log; |
166 | |
167 | #ifdef PHP_WIN32 |
168 | zend_bool windows_show_crt_warning; |
169 | #endif |
170 | }; |
171 | |
172 | |
173 | #endif /* PHP_GLOBALS_H */ |
174 | |
175 | /* |
176 | * Local variables: |
177 | * tab-width: 4 |
178 | * c-basic-offset: 4 |
179 | * End: |
180 | */ |
181 | |