diff options
author | Pierre Joye <pajoye@php.net> | 2011-07-22 11:25:30 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-07-22 11:25:30 +0000 |
commit | 9805e1674aefbc9e2a529a7351a045dab0282eb4 (patch) | |
tree | 05cd4674efea52fbd134237f26ef48b57f67a9b6 /sapi | |
parent | 8bfb9bcd0171eb6e578f1fc8f79e07c83fbcb403 (diff) | |
download | php-git-9805e1674aefbc9e2a529a7351a045dab0282eb4.tar.gz |
- remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 6 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_main.c | 5 |
2 files changed, 1 insertions, 10 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 01c417bef2..bc957867e0 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -648,12 +648,7 @@ static void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); - int magic_quotes_gpc = PG(magic_quotes_gpc); - - /* turn off magic_quotes while importing environment variables */ - PG(magic_quotes_gpc) = 0; fcgi_loadenv(request, cgi_php_load_env_var, array_ptr TSRMLS_CC); - PG(magic_quotes_gpc) = magic_quotes_gpc; } } @@ -880,6 +875,7 @@ static int sapi_cgi_activate(TSRMLS_D) } else { doc_root = getenv("DOCUMENT_ROOT"); } + /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */ if (doc_root) { doc_root_len = strlen(doc_root); diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 773cf2cf6d..f9c15ba7e2 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -524,7 +524,6 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) { fcgi_request *request; HashPosition pos; - int magic_quotes_gpc;; char *var, **val; uint var_len; ulong idx; @@ -557,11 +556,8 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) php_php_import_environment_variables(array_ptr TSRMLS_CC); request = (fcgi_request*) SG(server_context); - magic_quotes_gpc = PG(magic_quotes_gpc); filter_arg = (array_ptr == PG(http_globals)[TRACK_VARS_ENV])?PARSE_ENV:PARSE_SERVER; - /* turn off magic_quotes while importing environment variables */ - PG(magic_quotes_gpc) = 0; for (zend_hash_internal_pointer_reset_ex(request->env, &pos); zend_hash_get_current_key_ex(request->env, &var, &var_len, &idx, 0, &pos) == HASH_KEY_IS_STRING && zend_hash_get_current_data_ex(request->env, (void **) &val, &pos) == SUCCESS; @@ -573,7 +569,6 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) php_register_variable_safe(var, *val, new_val_len, array_ptr TSRMLS_CC); } } - PG(magic_quotes_gpc) = magic_quotes_gpc; } static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) |