summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-12-30 00:38:47 +0000
committerZeev Suraski <zeev@php.net>2000-12-30 00:38:47 +0000
commit0048312fa6db6334466b5666fd6564223b2bf912 (patch)
tree68bfd7884eee8f176bf47b3cdf1f4cc9d3c9b430 /sapi
parentc5b11042b0094a6db72a96850c6eec3d52065191 (diff)
downloadphp-git-0048312fa6db6334466b5666fd6564223b2bf912.tar.gz
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
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/mod_php4.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index 23580a911b..f4b50c7c54 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -440,11 +440,6 @@ int send_php(request_rec *r, int display_source_mode, char *filename)
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 @@ int send_php(request_rec *r, int display_source_mode, char *filename)
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) {