janiFri Aug 3 09:38:43 2007 UTC
Modified files:
/php-src/sapi/apache2filter apache_config.c
/php-src/sapi/apache2handlerapache_config.c
Log:
MFB
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/apache_config.c?r1=1.38r2=1.39diff_format=u
Index: php-src/sapi/apache2filter/apache_config.c
diff -u php-src/sapi/apache2filter/apache_config.c:1.38
php-src/sapi/apache2filter/apache_config.c:1.39
--- php-src/sapi/apache2filter/apache_config.c:1.38 Mon Jan 1 09:29:36 2007
+++ php-src/sapi/apache2filter/apache_config.c Fri Aug 3 09:38:43 2007
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: apache_config.c,v 1.38 2007/01/01 09:29:36 sebastian Exp $ */
+/* $Id: apache_config.c,v 1.39 2007/08/03 09:38:43 jani Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -35,7 +35,7 @@
#include http_log.h
#include http_main.h
#include util_script.h
-#include http_core.h
+#include http_core.h
#ifdef PHP_AP_DEBUG
#define phpapdebug(a) fprintf a
@@ -51,16 +51,15 @@
char *value;
size_t value_len;
char status;
+ char htaccess;
} php_dir_entry;
-static const char *real_value_hnd(cmd_parms *cmd, void *dummy,
- const char *name, const char *value, int status)
+static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char
*name, const char *value, int status)
{
php_conf_rec *d = dummy;
php_dir_entry e;
- phpapdebug((stderr, Getting %s=%s for %p (%d)\n, name, value, dummy,
- zend_hash_num_elements(d-config)));
+ phpapdebug((stderr, Getting %s=%s for %p (%d)\n, name, value, dummy,
zend_hash_num_elements(d-config)));
if (!strncasecmp(value, none, sizeof(none))) {
value = ;
@@ -69,26 +68,23 @@
e.value = apr_pstrdup(cmd-pool, value);
e.value_len = strlen(value);
e.status = status;
-
- zend_hash_update(d-config, (char *) name, strlen(name) + 1, e,
- sizeof(e), NULL);
+ e.htaccess = ((cmd-override (RSRC_CONF|ACCESS_CONF)) == 0);
+
+ zend_hash_update(d-config, (char *) name, strlen(name) + 1, e,
sizeof(e), NULL);
return NULL;
}
-static const char *php_apache_value_handler(cmd_parms *cmd, void *dummy,
- const char *name, const char *value)
+static const char *php_apache_value_handler(cmd_parms *cmd, void *dummy, const
char *name, const char *value)
{
return real_value_hnd(cmd, dummy, name, value, PHP_INI_PERDIR);
}
-static const char *php_apache_admin_value_handler(cmd_parms *cmd, void *dummy,
- const char *name, const char *value)
+static const char *php_apache_admin_value_handler(cmd_parms *cmd, void *dummy,
const char *name, const char *value)
{
return real_value_hnd(cmd, dummy, name, value, PHP_INI_SYSTEM);
}
-static const char *real_flag_hnd(cmd_parms *cmd, void *dummy, const char *arg1,
- const char *arg2, int status)
+static const char *real_flag_hnd(cmd_parms *cmd, void *dummy, const char
*arg1, const char *arg2, int status)
{
char bool_val[2];
@@ -102,24 +98,20 @@
return real_value_hnd(cmd, dummy, arg1, bool_val, status);
}
-static const char *php_apache_flag_handler(cmd_parms *cmd, void *dummy,
- const char *name, const char *value)
+static const char *php_apache_flag_handler(cmd_parms *cmd, void *dummy, const
char *name, const char *value)
{
return real_flag_hnd(cmd, dummy, name, value, PHP_INI_PERDIR);
}
-static const char *php_apache_admin_flag_handler(cmd_parms *cmd, void *dummy,
- const char *name, const char *value)
+static const char *php_apache_admin_flag_handler(cmd_parms *cmd, void *dummy,
const char *name, const char *value)
{
return real_flag_hnd(cmd, dummy, name, value, PHP_INI_SYSTEM);
}
-static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig,
- const char *arg)
+static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig, const
char *arg)
{
if (apache2_php_ini_path_override) {
- return Only first PHPINIDir directive honored per
configuration tree
- - subsequent ones ignored;
+ return Only first PHPINIDir directive honored per
configuration tree - subsequent ones ignored;
}
apache2_php_ini_path_override = ap_server_root_relative(cmd-pool, arg);
return NULL;
@@ -149,7 +141,7 @@
if (pe-status = data-status) continue;
}
zend_hash_update(n-config, str.s, str_len, data,
sizeof(*data), NULL);
- phpapdebug((stderr, ADDING/OVERWRITING %s (%d vs. %d)\n, str,
data-status, pe?pe-status:-1));
+ phpapdebug((stderr, ADDING/OVERWRITING %s (%d vs. %d)\n,
str.s, data-status,