php_globals.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 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@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef PHP_GLOBALS_H
  19. #define PHP_GLOBALS_H
  20. #include "zend_globals.h"
  21. typedef struct _php_core_globals php_core_globals;
  22. #ifdef ZTS
  23. # define PG(v) ZEND_TSRMG(core_globals_id, php_core_globals *, v)
  24. extern PHPAPI int core_globals_id;
  25. #else
  26. # define PG(v) (core_globals.v)
  27. extern ZEND_API struct _php_core_globals core_globals;
  28. #endif
  29. /* Error display modes */
  30. #define PHP_DISPLAY_ERRORS_STDOUT 1
  31. #define PHP_DISPLAY_ERRORS_STDERR 2
  32. /* Track vars */
  33. #define TRACK_VARS_POST 0
  34. #define TRACK_VARS_GET 1
  35. #define TRACK_VARS_COOKIE 2
  36. #define TRACK_VARS_SERVER 3
  37. #define TRACK_VARS_ENV 4
  38. #define TRACK_VARS_FILES 5
  39. #define TRACK_VARS_REQUEST 6
  40. struct _php_tick_function_entry;
  41. typedef struct _arg_separators {
  42. char *output;
  43. char *input;
  44. } arg_separators;
  45. struct _php_core_globals {
  46. zend_bool implicit_flush;
  47. zend_long output_buffering;
  48. zend_bool enable_dl;
  49. char *output_handler;
  50. char *unserialize_callback_func;
  51. zend_long serialize_precision;
  52. zend_long memory_limit;
  53. zend_long max_input_time;
  54. zend_bool track_errors;
  55. zend_bool display_errors;
  56. zend_bool display_startup_errors;
  57. zend_bool log_errors;
  58. zend_long log_errors_max_len;
  59. zend_bool ignore_repeated_errors;
  60. zend_bool ignore_repeated_source;
  61. zend_bool report_memleaks;
  62. char *error_log;
  63. char *doc_root;
  64. char *user_dir;
  65. char *include_path;
  66. char *open_basedir;
  67. char *extension_dir;
  68. char *php_binary;
  69. char *sys_temp_dir;
  70. char *upload_tmp_dir;
  71. zend_long upload_max_filesize;
  72. char *error_append_string;
  73. char *error_prepend_string;
  74. char *auto_prepend_file;
  75. char *auto_append_file;
  76. char *input_encoding;
  77. char *internal_encoding;
  78. char *output_encoding;
  79. arg_separators arg_separator;
  80. char *variables_order;
  81. HashTable rfc1867_protected_variables;
  82. short connection_status;
  83. zend_bool ignore_user_abort;
  84. unsigned char header_is_being_sent;
  85. zend_llist tick_functions;
  86. zval http_globals[6];
  87. zend_bool expose_php;
  88. zend_bool register_argc_argv;
  89. zend_bool auto_globals_jit;
  90. char *docref_root;
  91. char *docref_ext;
  92. zend_bool html_errors;
  93. zend_bool xmlrpc_errors;
  94. zend_long xmlrpc_error_number;
  95. zend_bool activated_auto_globals[8];
  96. zend_bool modules_activated;
  97. zend_bool file_uploads;
  98. zend_bool during_request_startup;
  99. zend_bool allow_url_fopen;
  100. zend_bool enable_post_data_reading;
  101. zend_bool report_zend_debug;
  102. int last_error_type;
  103. char *last_error_message;
  104. char *last_error_file;
  105. int last_error_lineno;
  106. char *php_sys_temp_dir;
  107. char *disable_functions;
  108. char *disable_classes;
  109. zend_bool allow_url_include;
  110. #ifdef PHP_WIN32
  111. zend_bool com_initialized;
  112. #endif
  113. zend_long max_input_nesting_level;
  114. zend_long max_input_vars;
  115. zend_bool in_user_include;
  116. char *user_ini_filename;
  117. zend_long user_ini_cache_ttl;
  118. char *request_order;
  119. zend_bool mail_x_header;
  120. char *mail_log;
  121. zend_bool in_error_log;
  122. #ifdef PHP_WIN32
  123. zend_bool windows_show_crt_warning;
  124. #endif
  125. zend_long syslog_facility;
  126. char *syslog_ident;
  127. zend_bool have_called_openlog;
  128. zend_long syslog_filter;
  129. };
  130. #endif /* PHP_GLOBALS_H */
  131. /*
  132. * Local variables:
  133. * tab-width: 4
  134. * c-basic-offset: 4
  135. * End:
  136. * vim600: sw=4 ts=4 fdm=marker
  137. * vim<600: sw=4 ts=4
  138. */