Back to index

php5  5.3.10
php_apache.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Sascha Schumann <sascha@schumann.cx>                         |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: php_apache.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_APACHE_H
00022 #define PHP_APACHE_H
00023 
00024 #include "httpd.h"
00025 #include "http_config.h"
00026 #include "http_core.h"
00027 
00028 /* Declare this so we can get to it from outside the sapi_apache2.c file */
00029 extern module AP_MODULE_DECLARE_DATA php5_module;
00030 
00031 /* A way to specify the location of the php.ini dir in an apache directive */
00032 extern char *apache2_php_ini_path_override;
00033 
00034 /* The server_context used by PHP */
00035 typedef struct php_struct {
00036        int state;
00037        request_rec *r;
00038        apr_bucket_brigade *brigade;
00039        /* stat structure of the current file */
00040 #if defined(NETWARE) && defined(CLIB_STAT_PATCH)
00041        struct stat_libc finfo;
00042 #else
00043        struct stat finfo;
00044 #endif
00045        /* Whether or not we've processed PHP in the output filters yet. */
00046        int request_processed;
00047        /* final content type */
00048        char *content_type;
00049 } php_struct;
00050 
00051 void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf);
00052 void *create_php_config(apr_pool_t *p, char *dummy);
00053 char *get_php_config(void *conf, char *name, size_t name_len);
00054 void apply_config(void *);
00055 extern const command_rec php_dir_cmds[];
00056 void php_ap2_register_hook(apr_pool_t *p);
00057 
00058 #define APR_ARRAY_FOREACH_OPEN(arr, key, val)           \
00059 {                                                                                          \
00060        apr_table_entry_t *elts;                                       \
00061        int i;                                                                       \
00062        elts = (apr_table_entry_t *) arr->elts;                 \
00063        for (i = 0; i < arr->nelts; i++) {                      \
00064               key = elts[i].key;                                             \
00065               val = elts[i].val;
00066 
00067 #define APR_ARRAY_FOREACH_CLOSE() }}
00068 
00069 typedef struct {
00070        long engine;
00071        long xbithack;
00072        long last_modified;
00073 } php_apache2_info_struct;
00074 
00075 extern zend_module_entry apache2_module_entry;
00076 
00077 #ifdef ZTS
00078 extern int php_apache2_info_id;
00079 #define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
00080 #else
00081 extern php_apache2_info_struct php_apache2_info;
00082 #define AP2(v) (php_apache2_info.v)
00083 #endif
00084 
00085 /* fix for gcc4 visibility patch */
00086 #ifndef PHP_WIN32
00087 # undef AP_MODULE_DECLARE_DATA
00088 # define AP_MODULE_DECLARE_DATA PHPAPI
00089 #endif
00090 
00091 #endif /* PHP_APACHE_H */