cvs: php4(php_4_0_4) /sapi/apache mod_php4.c
| From: | Zeev Suraski | Date: | Wed, 03 Jan 2001 22:07:59 +0000 |
| Subject: | cvs: php4(php_4_0_4) /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3355@lists.php.net to get a copy of this message | ||
zeev Wed Jan 3 14:07:59 2001 EDT
Modified files: (Branch: php_4_0_4)
/php4/sapi/apache mod_php4.c
Log:
Merge Apache module fixes - engine = off propogating to other vhosts
and possible INI entries corruption
PR:
Submitted by:
Reviewed by:
Obtained from:
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.77 php4/sapi/apache/mod_php4.c:1.77.2.1
--- php4/sapi/apache/mod_php4.c:1.77 Fri Nov 17 18:44:02 2000
+++ php4/sapi/apache/mod_php4.c Wed Jan 3 14:07:59 2001
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.77 2000/11/18 02:44:02 zeev Exp $ */
+/* $Id: mod_php4.c,v 1.77.2.1 2001/01/03 22:07:59 zeev Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -444,11 +444,6 @@
if (setjmp(EG(bailout))!=0) {
return OK;
}
- per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
- if (per_dir_conf) {
- zend_hash_apply((HashTable *) per_dir_conf, (int (*)(void *)) php_apache_alter_ini_entries);
- }
-
/* We don't accept OPTIONS requests, but take everything else */
if (r->method_number == M_OPTIONS) {
r->allowed |= (1 << METHODS) - 1;
@@ -460,12 +455,20 @@
return DECLINED;
}
+ per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
+ if (per_dir_conf) {
+ zend_hash_apply((HashTable *) per_dir_conf, (int (*)(void *)) php_apache_alter_ini_entries);
+ }
+
/* If PHP parser engine has been turned off with an "engine off"
* directive, then decline to handle this request
*/
if (!php_apache_info.engine) {
r->content_type = php_apache_get_default_mimetype(r SLS_CC);
r->allowed |= (1 << METHODS) - 1;
+ if (setjmp(EG(bailout))==0) {
+ zend_ini_rshutdown();
+ }
return DECLINED;
}
if (filename == NULL) {
@@ -474,13 +477,20 @@
/* Apache 1.2 has a more complex mechanism for reading POST data */
#if MODULE_MAGIC_NUMBER > 19961007
- if ((retval = setup_client_block(r, REQUEST_CHUNKED_ERROR)))
+ if ((retval = setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
+ if (setjmp(EG(bailout))==0) {
+ zend_ini_rshutdown();
+ }
return retval;
+ }
#endif
if (php_apache_info.last_modified) {
#if MODULE_MAGIC_NUMBER < 19970912
if ((retval = set_last_modified(r, r->finfo.st_mtime))) {
+ if (setjmp(EG(bailout))==0) {
+ zend_ini_rshutdown();
+ }
return retval;
}
#else