php_globals.h 3.8 KB

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