diff options
| -rw-r--r-- | ext/standard/file.c | 4 | ||||
| -rw-r--r-- | main/main.c | 10 | ||||
| -rw-r--r-- | main/php_globals.h | 2 | ||||
| -rw-r--r-- | mod_php4.c | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c index b18d742970..930f05667b 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -79,6 +79,10 @@ extern int fclose(); #include <sys/mman.h> #endif +#ifndef MAP_FAILED +#define MAP_FAILED ((void *) -1) +#endif + static void _php3_closesocket(int *); #ifndef THREAD_SAFE diff --git a/main/main.c b/main/main.c index 0b3c054194..6903623fa2 100644 --- a/main/main.c +++ b/main/main.c @@ -187,11 +187,11 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("magic_quotes_runtime", "0", PHP_INI_ALL, OnUpdateBool, magic_quotes_runtime, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("magic_quotes_sybase", "0", PHP_INI_ALL, OnUpdateBool, magic_quotes_sybase, php_core_globals, core_globals) - STD_PHP_INI_BOOLEAN("safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, safe_mode, php_core_globals, core_globals) - STD_PHP_INI_BOOLEAN("sql.safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, sql_safe_mode, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, safe_mode, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("sql.safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, sql_safe_mode, php_core_globals, core_globals) STD_PHP_INI_ENTRY("safe_mode_exec_dir", "1", PHP_INI_SYSTEM, OnUpdateString, safe_mode_exec_dir, php_core_globals, core_globals) - STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals) - PHP_INI_ENTRY_EX("expose_php", "1", PHP_INI_ALL, NULL, php_ini_boolean_displayer_cb) + STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("expose_php", "1", PHP_INI_SYSTEM, OnUpdateBool, expose_php, php_core_globals, core_globals) PHP_INI_ENTRY("SMTP", "localhost", PHP_INI_ALL, NULL) PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM, NULL) @@ -1120,7 +1120,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ SLS_FETCH(); if (SG(request_info).query_string && SG(request_info).query_string[0]=='=' - && INI_INT("expose_php")) { + && PG(expose_php)) { if (!strcmp(SG(request_info).query_string+1, "PHPE9568F34-D428-11d2-A769-00AA001ACF42")) { char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF)); diff --git a/main/php_globals.h b/main/php_globals.h index 4086bcac1b..ab2ba8ac32 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -79,6 +79,8 @@ struct _php_core_globals { char *arg_separator; char *gpc_order; + zend_bool expose_php; + zend_bool track_vars; zend_bool gpc_globals; diff --git a/mod_php4.c b/mod_php4.c index cc73f4bc89..f4e5d9dc5c 100644 --- a/mod_php4.c +++ b/mod_php4.c @@ -488,7 +488,7 @@ void php_init_handler(server_rec *s, pool *p) apache_php_initialized = 1; } #if MODULE_MAGIC_NUMBER >= 19980527 - if (INI_INT("expose_php")) { + if (INI_INT(PG(expose_php)) { ap_add_version_component("PHP/" PHP_VERSION); } #endif |
