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.

Classes

struct  php_struct
struct  _php_apr_bucket_brigade

Defines

#define APR_ARRAY_FOREACH_OPEN(arr, key, val)
#define APR_ARRAY_FOREACH_CLOSE()   }}
#define AP_MODULE_DECLARE_DATA   PHPAPI

Typedefs

typedef struct php_struct php_struct
typedef struct
_php_apr_bucket_brigade 
php_apr_bucket_brigade

Functions

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 *)
static size_t php_apache_read_stream (void *, char *, size_t TSRMLS_DC)
static size_t php_apache_fsizer_stream (void *TSRMLS_DC)

Variables

module AP_MODULE_DECLARE_DATA php5_module
char * apache2_php_ini_path_override
const command_rec php_dir_cmds []

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_apr_bucket_brigade

Definition at line 51 of file php_apache.h.

Class Members
apr_bucket_brigade * bb

Define Documentation

Definition at line 78 of file php_apache.h.

#define APR_ARRAY_FOREACH_CLOSE ( )    }}

Definition at line 73 of file php_apache.h.

#define APR_ARRAY_FOREACH_OPEN (   arr,
  key,
  val 
)
Value:
{                                                                                          \
       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 64 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"));
              }      
       }
}
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;
}
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 "";
}
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;
}
static size_t php_apache_fsizer_stream ( void *  TSRMLS_DC) [static]
static size_t php_apache_read_stream ( void *  ,
char *  ,
size_t  TSRMLS_DC 
) [static]

Variable Documentation

Definition at line 64 of file sapi_apache2.c.

Definition at line 68 of file mod_php5.c.

const command_rec php_dir_cmds[]

Definition at line 181 of file apache_config.c.