cvs: php4 /sapi/apache mod_php4.c sapi_apache.c

From: Date: Mon, 23 Jul 2001 01:03:22 +0000
Subject: cvs: php4 /sapi/apache mod_php4.c sapi_apache.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6321@lists.php.net to get a copy of this message
sas Sun Jul 22 21:03:22 2001 EDT Modified files: /php4/sapi/apache mod_php4.c sapi_apache.c Log: Use synchronous php_request_shutdown in the standard case and let the pool cleanup function only become effective, when an error has occured. This fixes the problem that the request_conn was already dead when the request_shutdown was reached. Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.106 php4/sapi/apache/mod_php4.c:1.107 --- php4/sapi/apache/mod_php4.c:1.106 Sat Jul 21 10:27:55 2001 +++ php4/sapi/apache/mod_php4.c Sun Jul 22 21:03:22 2001 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.106 2001/07/21 14:27:55 zeev Exp $ */ +/* $Id: mod_php4.c,v 1.107 2001/07/23 01:03:22 sas Exp $ */ #define NO_REGEX_EXTRA_H #ifdef WIN32 @@ -312,9 +312,11 @@ SLS_FETCH(); APLS_FETCH(); - AP(in_request)=0; SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */ - php_request_shutdown(dummy); + if (AP(in_request)) { + AP(in_request) = 0; + php_request_shutdown(dummy); + } } /* }}} */ Index: php4/sapi/apache/sapi_apache.c diff -u php4/sapi/apache/sapi_apache.c:1.27 php4/sapi/apache/sapi_apache.c:1.28 --- php4/sapi/apache/sapi_apache.c:1.27 Sat Jul 21 12:18:03 2001 +++ php4/sapi/apache/sapi_apache.c Sun Jul 22 21:03:22 2001 @@ -19,7 +19,7 @@ | Stig Bakken <ssb@fast.no> | +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache.c,v 1.27 2001/07/21 16:18:03 zeev Exp $ */ +/* $Id: sapi_apache.c,v 1.28 2001/07/23 01:03:22 sas Exp $ */ #define NO_REGEX_EXTRA_H #ifdef WIN32 @@ -56,13 +56,14 @@ #include "ext/standard/php_standard.h" #include "util_script.h" #include "php_version.h" -/*#include "mod_php4.h"*/ +#include "mod_php4.h" /* {{{ apache_php_module_main */ int apache_php_module_main(request_rec *r, int display_source_mode CLS_DC ELS_DC PLS_DC SLS_DC) { zend_file_handle file_handle; + APLS_FETCH(); if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC) == FAILURE) { return FAILURE; @@ -90,10 +91,12 @@ (void) php_execute_script(&file_handle CLS_CC ELS_CC PLS_CC); } + AP(in_request) = 0; + zend_try { - php_end_ob_buffers(1); - php_header(); /* Make sure headers have been sent */ + php_request_shutdown(NULL); } zend_end_try(); + return (OK); } /* }}} */

« previous php.cvs (#6321) next »