1 /* 2 +----------------------------------------------------------------------+ 3 | Copyright (c) The PHP Group | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Author: Zeev Suraski <zeev@php.net> | 14 +----------------------------------------------------------------------+ 15 */ 16 17 #ifndef PHP_GLOBALS_H 18 #define PHP_GLOBALS_H 19 20 #include "zend_globals.h" 21 22 typedef struct _php_core_globals php_core_globals; 23 24 #ifdef ZTS 25 # define PG(v) ZEND_TSRMG_FAST(core_globals_offset, php_core_globals *, v) 26 extern PHPAPI int core_globals_id; 27 extern PHPAPI size_t core_globals_offset; 28 #else 29 # define PG(v) (core_globals.v) 30 extern ZEND_API struct _php_core_globals core_globals; 31 #endif 32 33 /* Error display modes */ 34 #define PHP_DISPLAY_ERRORS_STDOUT 1 35 #define PHP_DISPLAY_ERRORS_STDERR 2 36 37 /* Track vars */ 38 #define TRACK_VARS_POST 0 39 #define TRACK_VARS_GET 1 40 #define TRACK_VARS_COOKIE 2 41 #define TRACK_VARS_SERVER 3 42 #define TRACK_VARS_ENV 4 43 #define TRACK_VARS_FILES 5 44 #define TRACK_VARS_REQUEST 6 45 46 struct _php_tick_function_entry; 47 48 typedef struct _arg_separators { 49 char *output; 50 char *input; 51 } arg_separators; 52 53 struct _php_core_globals { 54 zend_bool implicit_flush; 55 56 zend_long output_buffering; 57 58 zend_bool enable_dl; 59 60 char *output_handler; 61 62 char *unserialize_callback_func; 63 zend_long serialize_precision; 64 65 zend_long memory_limit; 66 zend_long max_input_time; 67 68 zend_uchar display_errors; 69 zend_bool display_startup_errors; 70 zend_bool log_errors; 71 zend_long log_errors_max_len; 72 zend_bool ignore_repeated_errors; 73 zend_bool ignore_repeated_source; 74 zend_bool report_memleaks; 75 char *error_log; 76 77 char *doc_root; 78 char *user_dir; 79 char *include_path; 80 char *open_basedir; 81 char *extension_dir; 82 char *php_binary; 83 char *sys_temp_dir; 84 85 char *upload_tmp_dir; 86 zend_long upload_max_filesize; 87 88 char *error_append_string; 89 char *error_prepend_string; 90 91 char *auto_prepend_file; 92 char *auto_append_file; 93 94 char *input_encoding; 95 char *internal_encoding; 96 char *output_encoding; 97 98 arg_separators arg_separator; 99 100 char *variables_order; 101 102 HashTable rfc1867_protected_variables; 103 104 short connection_status; 105 zend_bool ignore_user_abort; 106 107 unsigned char header_is_being_sent; 108 109 zend_llist tick_functions; 110 111 zval http_globals[6]; 112 113 zend_bool expose_php; 114 115 zend_bool register_argc_argv; 116 zend_bool auto_globals_jit; 117 118 char *docref_root; 119 char *docref_ext; 120 121 zend_bool html_errors; 122 zend_bool xmlrpc_errors; 123 124 zend_long xmlrpc_error_number; 125 126 zend_bool activated_auto_globals[8]; 127 128 zend_bool modules_activated; 129 zend_bool file_uploads; 130 zend_bool during_request_startup; 131 zend_bool allow_url_fopen; 132 zend_bool enable_post_data_reading; 133 zend_bool report_zend_debug; 134 135 int last_error_type; 136 zend_string *last_error_message; 137 char *last_error_file; 138 int last_error_lineno; 139 140 char *php_sys_temp_dir; 141 142 char *disable_classes; 143 zend_bool allow_url_include; 144 #ifdef PHP_WIN32 145 zend_bool com_initialized; 146 #endif 147 zend_long max_input_nesting_level; 148 zend_long max_input_vars; 149 zend_bool in_user_include; 150 151 char *user_ini_filename; 152 zend_long user_ini_cache_ttl; 153 154 char *request_order; 155 156 zend_bool mail_x_header; 157 char *mail_log; 158 159 zend_bool in_error_log; 160 161 #ifdef PHP_WIN32 162 zend_bool windows_show_crt_warning; 163 #endif 164 165 zend_long syslog_facility; 166 char *syslog_ident; 167 zend_bool have_called_openlog; 168 zend_long syslog_filter; 169 }; 170 171 172 #endif /* PHP_GLOBALS_H */ 173