cvs: /php4 main.c
| From: | Sascha Schumann | Date: | Tue, 14 Dec 1999 00:01:39 +0000 |
| Subject: | cvs: /php4 main.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7882@lists.php.net to get a copy of this message | ||
sas Mon Dec 13 19:01:39 1999 EDT
Modified files:
/php4 main.c
Log:
Postpone the execution of post request startup handlers until the symbol_table is populated
Index: php4/main.c
diff -u php4/main.c:1.154 php4/main.c:1.155
--- php4/main.c:1.154 Sun Dec 12 05:49:03 1999
+++ php4/main.c Mon Dec 13 19:01:08 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.154 1999/12/12 10:49:03 sas Exp $ */
+/* $Id: main.c,v 1.155 1999/12/14 00:01:08 sas Exp $ */
#include <stdio.h>
@@ -679,9 +679,15 @@
ptr->func(ptr->userdata);
}
-static void php_finish_post_request_startup(PLS_D)
+static void php_execute_post_request_startup(PLS_D)
{
zend_llist_apply(&PG(ll_post_request_startup), php_start_post_request_startup);
+}
+
+static void php_destroy_post_request_startup(void)
+{
+ PLS_FETCH();
+
zend_llist_destroy(&PG(ll_post_request_startup));
}
@@ -765,8 +771,6 @@
zend_hash_update(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"),
&auth_password, sizeof(zval *), NULL);
}
-
- php_finish_post_request_startup(PLS_C);
return SUCCESS;
}
@@ -792,6 +796,7 @@
ELS_FETCH();
SLS_FETCH();
+ php_destroy_post_request_startup();
sapi_send_headers();
php_end_ob_buffering(SG(request_info).headers_only?0:1);
@@ -1273,6 +1278,7 @@
if (EG(main_op_array)) {
zend_hash_environment(PLS_C ELS_CC SLS_CC);
EG(active_op_array) = EG(main_op_array);
+ php_execute_post_request_startup(PLS_C);
zend_execute(EG(main_op_array) ELS_CC);
}
}