diff options
author | Stanislav Malyshev <stas@php.net> | 2007-08-03 01:14:44 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-08-03 01:14:44 +0000 |
commit | c94dee86969d1dd58386f9b8c780a38e2b4532eb (patch) | |
tree | 64546a8f8c60790d6193446ef2788bfb55bf4708 /sapi/apache2handler/apache_config.c | |
parent | 0ad85237ea66098fc1084072c0c38e534a7592fd (diff) | |
download | php-git-c94dee86969d1dd58386f9b8c780a38e2b4532eb.tar.gz |
implement separate .htaccess stage
Diffstat (limited to 'sapi/apache2handler/apache_config.c')
-rw-r--r-- | sapi/apache2handler/apache_config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index 1c6b9ab0f6..14d00a322b 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -51,6 +51,7 @@ typedef struct { 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) @@ -67,7 +68,8 @@ static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char *name, e.value = apr_pstrdup(cmd->pool, value); e.value_len = strlen(value); e.status = status; - + 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; } @@ -170,7 +172,7 @@ void apply_config(void *dummy) zend_hash_move_forward(&d->config)) { zend_hash_get_current_data(&d->config, (void **) &data); phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value)); - if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) { + if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) { phpapdebug((stderr, "..FAILED\n")); } } |