~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to sapi/apache2handler/php_apache.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   +----------------------------------------------------------------------+
 
3
   | PHP Version 5                                                        |
 
4
   +----------------------------------------------------------------------+
 
5
   | Copyright (c) 1997-2004 The PHP Group                                |
 
6
   +----------------------------------------------------------------------+
 
7
   | This source file is subject to version 3.0 of the PHP license,       |
 
8
   | that is bundled with this package in the file LICENSE, and is        |
 
9
   | available through the world-wide-web at the following url:           |
 
10
   | http://www.php.net/license/3_0.txt.                                  |
 
11
   | If you did not receive a copy of the PHP license and are unable to   |
 
12
   | obtain it through the world-wide-web, please send a note to          |
 
13
   | license@php.net so we can mail you a copy immediately.               |
 
14
   +----------------------------------------------------------------------+
 
15
   | Author: Sascha Schumann <sascha@schumann.cx>                         |
 
16
   +----------------------------------------------------------------------+
 
17
 */
 
18
 
 
19
/* $Id: php_apache.h,v 1.7 2004/01/08 17:33:18 sniper Exp $ */
 
20
 
 
21
#ifndef PHP_APACHE_H
 
22
#define PHP_APACHE_H
 
23
 
 
24
#include "httpd.h"
 
25
#include "http_config.h"
 
26
#include "http_core.h"
 
27
 
 
28
/* Declare this so we can get to it from outside the sapi_apache2.c file */
 
29
extern module AP_MODULE_DECLARE_DATA php5_module;
 
30
 
 
31
/* A way to specify the location of the php.ini dir in an apache directive */
 
32
extern char *apache2_php_ini_path_override;
 
33
 
 
34
/* The server_context used by PHP */
 
35
typedef struct php_struct {
 
36
        int state;
 
37
        request_rec *r;
 
38
        apr_bucket_brigade *brigade;
 
39
        /* stat structure of the current file */
 
40
#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
 
41
        struct stat_libc finfo;
 
42
#else
 
43
        struct stat finfo;
 
44
#endif
 
45
        /* Whether or not we've processed PHP in the output filters yet. */
 
46
        int request_processed;
 
47
} php_struct;
 
48
 
 
49
void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf);
 
50
void *create_php_config(apr_pool_t *p, char *dummy);
 
51
char *get_php_config(void *conf, char *name, size_t name_len);
 
52
void apply_config(void *);
 
53
extern const command_rec php_dir_cmds[];
 
54
void php_ap2_register_hook(apr_pool_t *p);
 
55
 
 
56
#define APR_ARRAY_FOREACH_OPEN(arr, key, val)           \
 
57
{                                                                                                       \
 
58
        apr_table_entry_t *elts;                                                \
 
59
        int i;                                                                                  \
 
60
        elts = (apr_table_entry_t *) arr->elts;                 \
 
61
        for (i = 0; i < arr->nelts; i++) {                              \
 
62
                key = elts[i].key;                                                      \
 
63
                val = elts[i].val;
 
64
 
 
65
#define APR_ARRAY_FOREACH_CLOSE() }}
 
66
 
 
67
typedef struct {
 
68
        long engine;
 
69
        long xbithack;
 
70
        long last_modified;
 
71
} php_apache2_info_struct;
 
72
 
 
73
extern zend_module_entry apache2_module_entry;
 
74
 
 
75
#ifdef ZTS
 
76
extern int php_apache2_info_id;
 
77
#define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
 
78
#else
 
79
extern php_apache2_info_struct php_apache2_info;
 
80
#define AP2(v) (php_apache2_info.v)
 
81
#endif
 
82
 
 
83
 
 
84
#endif /* PHP_APACHE_H */