{
php_conf_rec *d = dummy;
php_dir_entry e;
- php_dir_entry *pe;
- size_t str_len;
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 = "";
+ }
+
e.value = apr_pstrdup(cmd->pool, value);
e.value_len = strlen(value);
e.status = status;
- str_len = strlen(name);
-
- if (zend_hash_find(&d->config, (char *) name, str_len + 1, (void **) &pe) == SUCCESS) {
- if (pe->status > status)
- return NULL;
- }
-
- zend_hash_update(&d->config, (char *) name, strlen(name) + 1, &e, sizeof(e),
- NULL);
+ zend_hash_update(&d->config, (char *) name, strlen(name) + 1, &e, sizeof(e), NULL);
return NULL;
}
return new_conf;
}
+char *get_php_config(void *conf, char *name, size_t name_len)
+{
+ php_conf_rec *d = conf;
+ php_dir_entry *pe;
+
+ if (zend_hash_find(&d->config, name, name_len, (void **) &pe) == SUCCESS) {
+ return pe->value;
+ }
+
+ return "";
+}
+
void apply_config(void *dummy)
{
php_conf_rec *d = dummy;
void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf);
void *create_php_config(apr_pool_t *p, char *dummy);
+char *get_php_config(void *conf, char *name, size_t name_len);
void apply_config(void *);
extern const command_rec php_dir_cmds[];
php_struct *ctx;
apr_bucket *b;
void *conf = ap_get_module_config(f->r->per_dir_config, &php4_module);
+ char *p = get_php_config(conf, "engine", sizeof("engine"));
TSRMLS_FETCH();
if (f->r->proxyreq) {
return ap_pass_brigade(f->next, bb);
}
+
+ /* handle situations where user turns the engine off */
+ if (*p == '0') {
+ return ap_pass_brigade(f->next, bb);
+ }
/* setup standard CGI variables */
ap_add_common_vars(f->r);