Back to index

php5  5.3.10
Classes | Defines | Typedefs | Functions | Variables
php_apache.h File Reference
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  php_struct
struct  php_apache2_info_struct


#define APR_ARRAY_FOREACH_OPEN(arr, key, val)
#define AP2(v)   (php_apache2_info.v)


typedef struct php_struct php_struct


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 *)
void php_ap2_register_hook (apr_pool_t *p)


module AP_MODULE_DECLARE_DATA php5_module
char * apache2_php_ini_path_override
const command_rec php_dir_cmds []
zend_module_entry apache2_module_entry
php_apache2_info_struct php_apache2_info

Class Documentation

struct php_struct

Definition at line 35 of file php_apache.h.

Class Members
apr_bucket_brigade * brigade
char * content_type
ap_filter_t * f
char * post_data
int post_idx
int post_len
request_rec * r
int request_processed
int state
struct php_apache2_info_struct

Definition at line 69 of file php_apache.h.

Class Members
long engine
long last_modified
long xbithack

Define Documentation

#define AP2 (   v)    (php_apache2_info.v)

Definition at line 82 of file php_apache.h.

Definition at line 88 of file php_apache.h.

#define APR_ARRAY_FOREACH_CLOSE ( )    }}

Definition at line 67 of file php_apache.h.

#define APR_ARRAY_FOREACH_OPEN (   arr,
{                                                                                          \
       apr_table_entry_t *elts;                                       \
       int i;                                                                       \
       elts = (apr_table_entry_t *) arr->elts;                 \
       for (i = 0; i < arr->nelts; i++) {                      \
              key = elts[i].key;                                             \
              val = elts[i].val;

Definition at line 58 of file php_apache.h.

Typedef Documentation

typedef struct php_struct php_struct

Function Documentation

void apply_config ( void *  )

Definition at line 162 of file apache_config.c.

       php_conf_rec *d = dummy;
       char *str;
       uint str_len;
       php_dir_entry *data;
       for (zend_hash_internal_pointer_reset(&d->config);
                     zend_hash_get_current_key_ex(&d->config, &str, &str_len, NULL, 0, 
                            NULL) == HASH_KEY_IS_STRING;
                     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, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
                     phpapdebug((stderr, "..FAILED\n"));

Here is the call graph for this function:

Here is the caller graph for this function:

void* create_php_config ( apr_pool_t *  p,
char *  dummy 

Definition at line 201 of file apache_config.c.

       php_conf_rec *newx = (php_conf_rec *) apr_pcalloc(p, sizeof(*newx));

       phpapdebug((stderr, "Creating new config (%p) for %s\n", newx, dummy));
       zend_hash_init(&newx->config, 0, NULL, NULL, 1);
       apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null);
       return (void *) newx;

Here is the call graph for this function:

Here is the caller graph for this function:

char* get_php_config ( void *  conf,
char *  name,
size_t  name_len 

Definition at line 150 of file apache_config.c.

       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 "";

Here is the call graph for this function:

Here is the caller graph for this function:

void* merge_php_config ( apr_pool_t *  p,
void *  base_conf,
void *  new_conf 

Definition at line 121 of file apache_config.c.

       php_conf_rec *d = base_conf, *e = new_conf, *n = NULL;
       php_dir_entry *pe;
       php_dir_entry *data;
       char *str;
       uint str_len;
       ulong num_index;

       n = create_php_config(p, "merge_php_config");
       zend_hash_copy(&n->config, &e->config, NULL, NULL, sizeof(php_dir_entry));

       phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
       for (zend_hash_internal_pointer_reset(&d->config);
                     zend_hash_get_current_key_ex(&d->config, &str, &str_len, 
                            &num_index, 0, NULL) == HASH_KEY_IS_STRING;
                     zend_hash_move_forward(&d->config)) {
              pe = NULL;
              zend_hash_get_current_data(&d->config, (void **) &data);
              if (zend_hash_find(&n->config, str, str_len, (void **) &pe) == SUCCESS) {
                     if (pe->status >= data->status) continue;
              zend_hash_update(&n->config, str, str_len, data, sizeof(*data), NULL);
              phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str, data->status, pe?pe->status:-1));

       return n;

Here is the call graph for this function:

void php_ap2_register_hook ( apr_pool_t *  p)

Definition at line 705 of file sapi_apache2.c.

       ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_handler(php_handler, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);

Here is the call graph for this function:

Variable Documentation

zend_module_entry apache2_module_entry

Definition at line 64 of file sapi_apache2.c.

Definition at line 68 of file mod_php5.c.

Definition at line 54 of file php_functions.c.

const command_rec php_dir_cmds[]

Definition at line 181 of file apache_config.c.