From: Derick Rethans Date: Wed, 20 Nov 2002 17:49:57 +0000 (+0000) Subject: - MFH: Add an error message to the ini handlers X-Git-Tag: php-4.3.0RC2~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20c0cd2a889447a34d9244cb7b4d400ba19f1469;p=php - MFH: Add an error message to the ini handlers --- diff --git a/ext/session/session.c b/ext/session/session.c index d06c0d29a9..dc3b9c8e5c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -85,6 +85,10 @@ static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC); static PHP_INI_MH(OnUpdateSaveHandler) { + if (PS(session_status) == php_session_active) { + php_error(E_WARNING, "A session is active. You cannot change the session module's ini settings at this time."); + return FAILURE; + } PS(mod) = _php_find_ps_module(new_value TSRMLS_CC); /* * Following lines are commented out to prevent bogus error message at @@ -102,6 +106,10 @@ static PHP_INI_MH(OnUpdateSaveHandler) static PHP_INI_MH(OnUpdateSerializer) { + if (PS(session_status) == php_session_active) { + php_error(E_WARNING, "A session is active. You cannot change the session module's ini settings at this time."); + return FAILURE; + } PS(serializer) = _php_find_ps_serializer(new_value TSRMLS_CC); /* * Following lines are commented out to prevent bogus error message at