From: Edin Kadribasic Date: Thu, 8 May 2003 09:19:44 +0000 (+0000) Subject: Fix for bug #23504. Read per_dir configuration before trying to open the X-Git-Tag: php-4.3.2RC3~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f601dff0c2ce166336eb23c3524ba5bad64aca4d;p=php Fix for bug #23504. Read per_dir configuration before trying to open the the php file for execution. --- diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index d5f59b21d2..8c38be58df 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -533,6 +533,11 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) HashTable *per_dir_conf; TSRMLS_FETCH(); + per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module); + if (per_dir_conf) { + zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); + } + if (AP(in_request)) { zend_file_handle fh; @@ -556,11 +561,6 @@ static 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, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); - } - /* If PHP parser engine has been turned off with an "engine off" * directive, then decline to handle this request */