From 06a2e4ce94616979721484e96feda538a51a3566 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 4 Jul 2005 12:47:26 +0000 Subject: [PATCH] Fixed bug #33520 (crash if safe_mode is on and session.save_path is changed) --- NEWS | 2 ++ sapi/aolserver/aolserver.c | 2 +- sapi/apache2filter/apache_config.c | 2 +- sapi/apache2handler/apache_config.c | 2 +- sapi/nsapi/nsapi.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 3d141569b9..fbfe172fe1 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ PHP NEWS - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey) - Fixed memory corruption in stristr(). (Derick) - Fixed segfaults when CURL callback functions throw exception. (Tony) +- Fixed bug #33520 (crash if safe_mode is on and session.save_path is changed). + (Dmitry) - Fixed bug #33491 (crash after extending MySQLi internal class). (Tony) - Fixed bug #33340 (CLI Crash when calling php:function from XSLT). (Rob) - Fixed bug #33277 (private method accessed by child class). (Dmitry) diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c index 6f685ad9d4..048521fbb3 100644 --- a/sapi/aolserver/aolserver.c +++ b/sapi/aolserver/aolserver.c @@ -549,7 +549,7 @@ php_ns_config(php_ns_context *ctx, char global) Ns_Log(Debug, "PHP configuration option '%s=%s'", new_key, val); zend_alter_ini_entry(new_key, strlen(new_key) + 1, val, - strlen(val) + 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME); + strlen(val) + 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); efree(new_key); } diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index 61d565a230..ea62539b96 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -178,7 +178,7 @@ void apply_config(void *dummy) zend_hash_get_current_data(&d->config, (void **) &data); phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value)); if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, - data->status, PHP_INI_STAGE_RUNTIME) == FAILURE) { + data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) { phpapdebug((stderr, "..FAILED\n")); } } diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index bf0b2e0cc3..62feef00d9 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -166,7 +166,7 @@ void apply_config(void *dummy) zend_hash_move_forward(&d->config)) { zend_hash_get_current_data(&d->config, (void **) &data); phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value)); - if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, PHP_INI_STAGE_RUNTIME) == FAILURE) { + if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) { phpapdebug((stderr, "..FAILED\n")); } } diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 868bf9b0d9..a441134d74 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -768,7 +768,7 @@ static void nsapi_php_ini_entries(NSLS_D TSRMLS_DC) /* change the ini entry */ if (zend_alter_ini_entry(entry->param->name, strlen(entry->param->name)+1, entry->param->value, strlen(entry->param->value), - PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME)==FAILURE) { + PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE)==FAILURE) { log_error(LOG_WARN, pblock_findval("fn", NSG(pb)), NSG(sn), NSG(rq), "Cannot change php.ini key \"%s\" to \"%s\"", entry->param->name, entry->param->value); } } -- 2.50.1