From abe0176840dabdb12cda3c79a9d528ca662b86dc Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Wed, 17 Nov 1999 22:59:27 +0000 Subject: [PATCH] (php_rinit_session): use post request startups to reenable session.auto_start --- ext/session/session.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index edd011d310..73b0a412ef 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -921,6 +921,13 @@ static void php_rshutdown_session_globals(PSLS_D) zend_hash_destroy(&PS(vars)); } +void _php_session_auto_start(void *data) +{ + PSLS_FETCH(); + + _php_session_start(PSLS_C); +} + PHP_RINIT_FUNCTION(session) { PSLS_FETCH(); @@ -934,15 +941,8 @@ PHP_RINIT_FUNCTION(session) } if(INI_INT("session.auto_start")) { - php_error(E_ERROR, "session.auto_start is not available in this version. Disable it in your configuration."); - return FAILURE; + php_register_post_request_startup(_php_session_auto_start, NULL); } - -#if 0 - if(INI_INT("session.auto_start")) { - _php_session_start(PSLS_C); - } -#endif return SUCCESS; } -- 2.40.0