]> granicus.if.org Git - php/commitdiff
(php_rinit_session): use post request startups to reenable session.auto_start
authorSascha Schumann <sas@php.net>
Wed, 17 Nov 1999 22:59:27 +0000 (22:59 +0000)
committerSascha Schumann <sas@php.net>
Wed, 17 Nov 1999 22:59:27 +0000 (22:59 +0000)
ext/session/session.c

index edd011d310465b76feb5e52351a7494e96312e2a..73b0a412efb4472f4ca8c8874b813da8a3c9c973 100644 (file)
@@ -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;
 }