cvs: php4 /sapi/apache mod_php4.c
| From: | Zeev Suraski | Date: | Sat, 30 Dec 2000 00:38:49 +0000 |
| Subject: | cvs: php4 /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3324@lists.php.net to get a copy of this message | ||
zeev Fri Dec 29 16:38:49 2000 EDT
Modified files:
/php4/sapi/apache mod_php4.c
Log:
Fix a few possible bugs:
- engine=off in one or more vhosts could propogate to other vhosts
- Under some error situations, the default values for INI directives
could be erroneously replaced for a single request
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.79 php4/sapi/apache/mod_php4.c:1.80
--- php4/sapi/apache/mod_php4.c:1.79 Sun Dec 10 15:22:20 2000
+++ php4/sapi/apache/mod_php4.c Fri Dec 29 16:38:47 2000
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.79 2000/12/10 23:22:20 sas Exp $ */
+/* $Id: mod_php4.c,v 1.80 2000/12/30 00:38:47 zeev Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -440,11 +440,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;
@@ -456,12 +451,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 (!AP(engine)) {
r->content_type = php_apache_get_default_mimetype(r SLS_CC);
r->allowed |= (1 << METHODS) - 1;
+ if (setjmp(EG(bailout))==0) {
+ zend_ini_deactivate(ELS_C);
+ }
return DECLINED;
}
if (filename == NULL) {