php_globals.h 4.1 KB

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