17#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
29#include "apr_strings.h"
31#include "util_filter.h"
33#include "http_config.h"
34#include "http_request.h"
36#include "http_protocol.h"
39#include "util_script.h"
43#define phpapdebug(a) fprintf a
59static const char *real_value_hnd(cmd_parms *cmd,
void *dummy,
const char *
name,
const char *
value,
int status)
73 e.
htaccess = ((cmd->override & (RSRC_CONF|ACCESS_CONF)) == 0);
79static const char *php_apache_value_handler(cmd_parms *cmd,
void *dummy,
const char *
name,
const char *
value)
84static const char *php_apache_admin_value_handler(cmd_parms *cmd,
void *dummy,
const char *
name,
const char *
value)
89static const char *real_flag_hnd(cmd_parms *cmd,
void *dummy,
const char *
arg1,
const char *
arg2,
int status)
100 return real_value_hnd(cmd, dummy,
arg1, bool_val,
status);
103static const char *php_apache_flag_handler(cmd_parms *cmd,
void *dummy,
const char *
name,
const char *
value)
108static const char *php_apache_admin_flag_handler(cmd_parms *cmd,
void *dummy,
const char *
name,
const char *
value)
113static const char *php_apache_phpini_set(cmd_parms *cmd,
void *mconfig,
const char *
arg)
116 return "Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored";
127 if ((orig_per_dir_entry = zend_hash_find_ptr(target_ht, hash_key->
key)) ==
NULL) {
131 if (new_per_dir_entry->
status >= orig_per_dir_entry->
status) {
165 key = zend_string_dup(str, 1);
175 phpapdebug((stderr,
"Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf,
n));
185 if ((pe = zend_hash_str_find_ptr(&d->
config,
name, name_len)) !=
NULL) {
208 AP_INIT_TAKE2(
"php_value", php_apache_value_handler,
NULL, OR_OPTIONS,
"PHP Value Modifier"),
209 AP_INIT_TAKE2(
"php_flag", php_apache_flag_handler,
NULL, OR_OPTIONS,
"PHP Flag Modifier"),
210 AP_INIT_TAKE2(
"php_admin_value", php_apache_admin_value_handler,
NULL, ACCESS_CONF|RSRC_CONF,
"PHP Value Modifier (Admin)"),
211 AP_INIT_TAKE2(
"php_admin_flag", php_apache_admin_flag_handler,
NULL, ACCESS_CONF|RSRC_CONF,
"PHP Flag Modifier (Admin)"),
212 AP_INIT_TAKE1(
"PHPINIDir", php_apache_phpini_set,
NULL, RSRC_CONF,
"Directory containing the php.ini file"),
216static apr_status_t destroy_php_config(
void *
data)
226static void config_entry_dtor(
zval *
zv)
235 phpapdebug((stderr,
"Creating new config (%p) for %s\n", newx, dummy));
237 apr_pool_cleanup_register(
p, newx, destroy_php_config, apr_pool_cleanup_null);
238 return (
void *) newx;
void config_entry_ctor(zval *zv)
char * get_php_config(void *conf, char *name, size_t name_len)
const command_rec php_dir_cmds[]
void * merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
void apply_config(void *dummy)
void * create_php_config(apr_pool_t *p, char *dummy)
char * apache2_php_ini_path_override
#define PHP_INI_STAGE_ACTIVATE
#define PHP_INI_STAGE_HTACCESS
unsigned char key[REFLECTION_KEY_LEN]
#define strncasecmp(s1, s2, n)
#define strcasecmp(s1, s2)
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor)
ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam)
ZEND_API zval *ZEND_FASTCALL zend_hash_add(HashTable *ht, zend_string *key, zval *pData)
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
struct _zend_hash_key zend_hash_key
#define ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(ht, _key, _ptr)
#define ZEND_HASH_FOREACH_END()
#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(ht, _key, _val)
ZEND_API zend_result zend_alter_ini_entry_chars(zend_string *name, const char *value, size_t value_length, int modify_type, int stage)
struct _zend_string zend_string
struct _zend_array HashTable