1999-07-16 21:13:16 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2014-09-20 00:33:14 +08:00
|
|
|
| PHP Version 7 |
|
1999-07-16 21:13:16 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2016-01-02 01:19:27 +08:00
|
|
|
| Copyright (c) 1997-2016 The PHP Group |
|
1999-07-16 21:13:16 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
1999-07-16 21:13:16 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
1999-07-16 21:13:16 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 16:29:35 +08:00
|
|
|
| Author: Zeev Suraski <zeev@zend.com> |
|
1999-07-16 21:13:16 +08:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
2003-02-19 16:40:19 +08:00
|
|
|
/* $Id$ */
|
1999-07-16 21:13:16 +08:00
|
|
|
|
2000-07-03 07:46:51 +08:00
|
|
|
#ifndef SAPI_H
|
|
|
|
#define SAPI_H
|
1999-04-26 03:36:57 +08:00
|
|
|
|
2014-02-13 10:54:52 +08:00
|
|
|
#include "php.h"
|
1999-05-06 02:25:20 +08:00
|
|
|
#include "zend.h"
|
2009-01-01 01:33:05 +08:00
|
|
|
#include "zend_API.h"
|
1999-05-06 02:25:20 +08:00
|
|
|
#include "zend_llist.h"
|
1999-05-26 05:14:54 +08:00
|
|
|
#include "zend_operators.h"
|
2004-08-21 11:09:45 +08:00
|
|
|
#ifdef PHP_WIN32
|
|
|
|
#include "win95nt.h"
|
2013-07-23 03:26:38 +08:00
|
|
|
#include "win32/php_stdint.h"
|
2004-08-21 11:09:45 +08:00
|
|
|
#endif
|
2000-02-11 02:19:04 +08:00
|
|
|
#include <sys/stat.h>
|
2014-08-16 17:16:11 +08:00
|
|
|
#include "php.h"
|
1999-05-06 02:25:20 +08:00
|
|
|
|
2001-04-17 07:20:47 +08:00
|
|
|
#define SAPI_OPTION_NO_CHDIR 1
|
2013-08-14 20:42:36 +08:00
|
|
|
#define SAPI_POST_BLOCK_SIZE 0x4000
|
1999-04-26 22:00:49 +08:00
|
|
|
|
2000-02-11 23:59:30 +08:00
|
|
|
#ifdef PHP_WIN32
|
1999-04-26 22:00:49 +08:00
|
|
|
# ifdef SAPI_EXPORTS
|
2015-01-03 17:22:58 +08:00
|
|
|
# define SAPI_API __declspec(dllexport)
|
1999-04-26 22:00:49 +08:00
|
|
|
# else
|
2015-01-03 17:22:58 +08:00
|
|
|
# define SAPI_API __declspec(dllimport)
|
1999-04-26 22:00:49 +08:00
|
|
|
# endif
|
2008-01-30 17:41:12 +08:00
|
|
|
#elif defined(__GNUC__) && __GNUC__ >= 4
|
|
|
|
# define SAPI_API __attribute__ ((visibility("default")))
|
1999-04-26 22:00:49 +08:00
|
|
|
#else
|
2008-01-30 17:41:12 +08:00
|
|
|
# define SAPI_API
|
1999-04-26 22:00:49 +08:00
|
|
|
#endif
|
|
|
|
|
2003-01-03 02:01:10 +08:00
|
|
|
#undef shutdown
|
1999-04-26 22:00:49 +08:00
|
|
|
|
1999-05-06 02:25:20 +08:00
|
|
|
typedef struct {
|
|
|
|
char *header;
|
2015-03-25 01:49:54 +08:00
|
|
|
size_t header_len;
|
1999-05-06 02:25:20 +08:00
|
|
|
} sapi_header_struct;
|
1999-05-03 02:07:41 +08:00
|
|
|
|
|
|
|
|
1999-05-06 02:25:20 +08:00
|
|
|
typedef struct {
|
|
|
|
zend_llist headers;
|
|
|
|
int http_response_code;
|
1999-05-09 16:48:05 +08:00
|
|
|
unsigned char send_default_content_type;
|
2002-07-27 21:58:16 +08:00
|
|
|
char *mimetype;
|
1999-05-12 04:38:16 +08:00
|
|
|
char *http_status_line;
|
1999-05-06 02:25:20 +08:00
|
|
|
} sapi_headers_struct;
|
|
|
|
|
|
|
|
|
2000-02-18 04:23:59 +08:00
|
|
|
typedef struct _sapi_post_entry sapi_post_entry;
|
1999-05-06 02:25:20 +08:00
|
|
|
typedef struct _sapi_module_struct sapi_module_struct;
|
1999-05-03 02:07:41 +08:00
|
|
|
|
2003-09-02 21:34:23 +08:00
|
|
|
BEGIN_EXTERN_C()
|
2001-01-03 06:49:31 +08:00
|
|
|
extern SAPI_API sapi_module_struct sapi_module; /* true global */
|
2003-09-02 21:34:23 +08:00
|
|
|
END_EXTERN_C()
|
1999-05-03 02:07:41 +08:00
|
|
|
|
2000-11-28 14:54:16 +08:00
|
|
|
/* Some values in this structure needs to be filled in before
|
2000-11-27 21:33:33 +08:00
|
|
|
* calling sapi_activate(). We WILL change the `char *' entries,
|
|
|
|
* so make sure that you allocate a separate buffer for them
|
|
|
|
* and that you free them after sapi_deactivate().
|
|
|
|
*/
|
1999-05-03 02:07:41 +08:00
|
|
|
|
|
|
|
typedef struct {
|
2000-11-02 23:47:02 +08:00
|
|
|
const char *request_method;
|
1999-05-03 02:07:41 +08:00
|
|
|
char *query_string;
|
2000-11-08 02:12:06 +08:00
|
|
|
char *cookie_data;
|
2014-08-26 01:24:55 +08:00
|
|
|
zend_long content_length;
|
1999-05-03 03:31:56 +08:00
|
|
|
|
|
|
|
char *path_translated;
|
|
|
|
char *request_uri;
|
1999-05-06 02:25:20 +08:00
|
|
|
|
2013-09-19 21:40:10 +08:00
|
|
|
/* Do not use request_body directly, but the php://input stream wrapper instead */
|
2013-08-14 20:42:36 +08:00
|
|
|
struct _php_stream *request_body;
|
|
|
|
|
2000-11-02 23:47:02 +08:00
|
|
|
const char *content_type;
|
1999-05-09 16:48:05 +08:00
|
|
|
|
2000-11-14 02:54:37 +08:00
|
|
|
zend_bool headers_only;
|
|
|
|
zend_bool no_headers;
|
2002-11-18 08:59:23 +08:00
|
|
|
zend_bool headers_read;
|
1999-05-12 04:38:16 +08:00
|
|
|
|
2000-02-18 04:23:59 +08:00
|
|
|
sapi_post_entry *post_entry;
|
|
|
|
|
|
|
|
char *content_type_dup;
|
|
|
|
|
1999-05-12 04:38:16 +08:00
|
|
|
/* for HTTP authentication */
|
|
|
|
char *auth_user;
|
|
|
|
char *auth_password;
|
2005-04-04 23:06:36 +08:00
|
|
|
char *auth_digest;
|
2000-02-11 04:03:17 +08:00
|
|
|
|
|
|
|
/* this is necessary for the CGI SAPI module */
|
|
|
|
char *argv0;
|
2000-02-11 04:13:08 +08:00
|
|
|
|
|
|
|
char *current_user;
|
|
|
|
int current_user_length;
|
2002-01-06 21:58:05 +08:00
|
|
|
|
2007-08-31 15:43:37 +08:00
|
|
|
/* this is necessary for CLI module */
|
|
|
|
int argc;
|
|
|
|
char **argv;
|
2005-03-15 03:25:39 +08:00
|
|
|
int proto_num;
|
1999-05-03 02:07:41 +08:00
|
|
|
} sapi_request_info;
|
1999-04-26 03:36:57 +08:00
|
|
|
|
|
|
|
|
2001-08-15 06:57:09 +08:00
|
|
|
typedef struct _sapi_globals_struct {
|
1999-04-26 03:36:57 +08:00
|
|
|
void *server_context;
|
1999-05-03 02:07:41 +08:00
|
|
|
sapi_request_info request_info;
|
1999-05-06 02:25:20 +08:00
|
|
|
sapi_headers_struct sapi_headers;
|
2013-07-23 00:03:11 +08:00
|
|
|
int64_t read_post_bytes;
|
2013-09-10 19:13:33 +08:00
|
|
|
unsigned char post_read;
|
1999-05-06 03:53:15 +08:00
|
|
|
unsigned char headers_sent;
|
2014-08-16 17:16:11 +08:00
|
|
|
zend_stat_t global_stat;
|
2000-02-26 05:27:03 +08:00
|
|
|
char *default_mimetype;
|
|
|
|
char *default_charset;
|
2000-09-09 05:56:47 +08:00
|
|
|
HashTable *rfc1867_uploaded_files;
|
2014-08-26 01:24:55 +08:00
|
|
|
zend_long post_max_size;
|
2003-01-15 19:22:04 +08:00
|
|
|
int options;
|
|
|
|
zend_bool sapi_started;
|
2010-11-07 01:14:21 +08:00
|
|
|
double global_request_time;
|
2005-02-21 23:14:02 +08:00
|
|
|
HashTable known_post_content_types;
|
2014-02-10 14:04:30 +08:00
|
|
|
zval callback_func;
|
2011-02-04 00:47:28 +08:00
|
|
|
zend_fcall_info_cache fci_cache;
|
1999-04-26 03:36:57 +08:00
|
|
|
} sapi_globals_struct;
|
|
|
|
|
|
|
|
|
2003-09-02 21:34:23 +08:00
|
|
|
BEGIN_EXTERN_C()
|
1999-04-26 03:36:57 +08:00
|
|
|
#ifdef ZTS
|
2014-10-16 00:23:41 +08:00
|
|
|
# define SG(v) ZEND_TSRMG(sapi_globals_id, sapi_globals_struct *, v)
|
reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but
- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed
What is done merely is
- use an inline function to access the tsrm cache. The function uses
the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
remove them later
Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.
The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-26 00:48:27 +08:00
|
|
|
SAPI_API extern int sapi_globals_id;
|
1999-04-26 03:36:57 +08:00
|
|
|
#else
|
|
|
|
# define SG(v) (sapi_globals.v)
|
1999-04-26 22:00:49 +08:00
|
|
|
extern SAPI_API sapi_globals_struct sapi_globals;
|
1999-04-26 03:36:57 +08:00
|
|
|
#endif
|
|
|
|
|
1999-05-06 05:11:27 +08:00
|
|
|
SAPI_API void sapi_startup(sapi_module_struct *sf);
|
1999-12-06 00:43:32 +08:00
|
|
|
SAPI_API void sapi_shutdown(void);
|
2014-12-14 06:06:14 +08:00
|
|
|
SAPI_API void sapi_activate(void);
|
|
|
|
SAPI_API void sapi_deactivate(void);
|
|
|
|
SAPI_API void sapi_initialize_empty_request(void);
|
2003-09-02 21:34:23 +08:00
|
|
|
END_EXTERN_C()
|
1999-05-06 05:11:27 +08:00
|
|
|
|
2002-07-03 18:42:31 +08:00
|
|
|
/*
|
2015-01-03 17:22:58 +08:00
|
|
|
* This is the preferred and maintained API for
|
2002-07-03 18:42:31 +08:00
|
|
|
* operating on HTTP headers.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Always specify a sapi_header_line this way:
|
|
|
|
*
|
|
|
|
* sapi_header_line ctr = {0};
|
|
|
|
*/
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2002-07-03 18:42:31 +08:00
|
|
|
typedef struct {
|
|
|
|
char *line; /* If you allocated this, you need to free it yourself */
|
2015-03-25 01:49:54 +08:00
|
|
|
size_t line_len;
|
2014-08-26 01:24:55 +08:00
|
|
|
zend_long response_code; /* long due to zend_parse_parameters compatibility */
|
2002-07-03 18:42:31 +08:00
|
|
|
} sapi_header_line;
|
|
|
|
|
|
|
|
typedef enum { /* Parameter: */
|
|
|
|
SAPI_HEADER_REPLACE, /* sapi_header_line* */
|
|
|
|
SAPI_HEADER_ADD, /* sapi_header_line* */
|
Added header_remove() (chsc at peytz dotdk, Arnaud)
[DOC] proto void header_remove([string header_name])
Removes an HTTP header previously set using header()
The header_name parameter is optionnal, all headers are
removed if it is not set
[SAPIs] The header_handler callback in sapi_module_struct has
been changed, it now take a new argument.
When it is set to SAPI_HEADER_DELETE, sapi_header->header is
the name of an header, header_handler has to delete it.
When it is set to SAPI_HEADER_DELETE_ALL, header_handler has
to delete all headers.
When sapi_header_op_enum is SAPI_HEADER_ADD or _REPLACE,
sapi_header->header is in the form "Name: value", header_handler
has to add or replace the given header.
In all cases, header_handler must not free sapi_header or
sapi_header->header. SAPI_HEADER_ADD must be returned if the
header has been added or replaced, or 0 in other cases.
2008-11-13 18:14:04 +08:00
|
|
|
SAPI_HEADER_DELETE, /* sapi_header_line* */
|
|
|
|
SAPI_HEADER_DELETE_ALL, /* void */
|
2002-07-03 18:42:31 +08:00
|
|
|
SAPI_HEADER_SET_STATUS /* int */
|
|
|
|
} sapi_header_op_enum;
|
|
|
|
|
2003-09-02 21:34:23 +08:00
|
|
|
BEGIN_EXTERN_C()
|
2014-12-14 06:06:14 +08:00
|
|
|
SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg);
|
2002-07-03 18:42:31 +08:00
|
|
|
|
|
|
|
/* Deprecated functions. Use sapi_header_op instead. */
|
2015-03-25 01:49:54 +08:00
|
|
|
SAPI_API int sapi_add_header_ex(char *header_line, size_t header_line_len, zend_bool duplicate, zend_bool replace);
|
2014-12-14 06:06:14 +08:00
|
|
|
#define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1)
|
2002-07-03 18:42:31 +08:00
|
|
|
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
SAPI_API int sapi_send_headers(void);
|
1999-12-10 20:38:20 +08:00
|
|
|
SAPI_API void sapi_free_header(sapi_header_struct *sapi_header);
|
2014-12-14 06:06:14 +08:00
|
|
|
SAPI_API void sapi_handle_post(void *arg);
|
2015-03-25 04:15:15 +08:00
|
|
|
SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen);
|
2014-12-14 06:06:14 +08:00
|
|
|
SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry);
|
|
|
|
SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry);
|
|
|
|
SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry);
|
|
|
|
SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(void));
|
|
|
|
SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray));
|
|
|
|
SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, size_t val_len, size_t *new_val_len), unsigned int (*input_filter_init)(void));
|
|
|
|
|
|
|
|
SAPI_API int sapi_flush(void);
|
|
|
|
SAPI_API zend_stat_t *sapi_get_stat(void);
|
|
|
|
SAPI_API char *sapi_getenv(char *name, size_t name_len);
|
|
|
|
|
|
|
|
SAPI_API char *sapi_get_default_content_type(void);
|
|
|
|
SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header);
|
|
|
|
SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len);
|
|
|
|
SAPI_API void sapi_activate_headers_only(void);
|
|
|
|
|
|
|
|
SAPI_API int sapi_get_fd(int *fd);
|
|
|
|
SAPI_API int sapi_force_http_10(void);
|
|
|
|
|
|
|
|
SAPI_API int sapi_get_target_uid(uid_t *);
|
|
|
|
SAPI_API int sapi_get_target_gid(gid_t *);
|
|
|
|
SAPI_API double sapi_get_request_time(void);
|
|
|
|
SAPI_API void sapi_terminate_process(void);
|
2003-09-02 21:34:23 +08:00
|
|
|
END_EXTERN_C()
|
2003-01-21 19:03:58 +08:00
|
|
|
|
1999-05-06 02:25:20 +08:00
|
|
|
struct _sapi_module_struct {
|
|
|
|
char *name;
|
2000-06-27 02:05:55 +08:00
|
|
|
char *pretty_name;
|
1999-05-06 02:25:20 +08:00
|
|
|
|
|
|
|
int (*startup)(struct _sapi_module_struct *sapi_module);
|
|
|
|
int (*shutdown)(struct _sapi_module_struct *sapi_module);
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
int (*activate)(void);
|
|
|
|
int (*deactivate)(void);
|
2000-02-11 00:44:59 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
size_t (*ub_write)(const char *str, size_t str_length);
|
|
|
|
void (*flush)(void *server_context);
|
|
|
|
zend_stat_t *(*get_stat)(void);
|
|
|
|
char *(*getenv)(char *name, size_t name_len);
|
1999-05-06 02:25:20 +08:00
|
|
|
|
1999-05-07 05:58:49 +08:00
|
|
|
void (*sapi_error)(int type, const char *error_msg, ...);
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
int (*header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers);
|
|
|
|
int (*send_headers)(sapi_headers_struct *sapi_headers);
|
|
|
|
void (*send_header)(sapi_header_struct *sapi_header, void *server_context);
|
1999-05-09 16:48:05 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
size_t (*read_post)(char *buffer, size_t count_bytes);
|
|
|
|
char *(*read_cookies)(void);
|
1999-09-17 07:18:15 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
void (*register_server_variables)(zval *track_vars_array);
|
|
|
|
void (*log_message)(char *message);
|
|
|
|
double (*get_request_time)(void);
|
|
|
|
void (*terminate_process)(void);
|
2000-01-29 01:24:53 +08:00
|
|
|
|
2001-01-03 06:49:31 +08:00
|
|
|
char *php_ini_path_override;
|
|
|
|
|
2000-02-11 02:44:33 +08:00
|
|
|
void (*block_interruptions)(void);
|
|
|
|
void (*unblock_interruptions)(void);
|
2003-01-15 19:22:04 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
void (*default_post_reader)(void);
|
|
|
|
void (*treat_data)(int arg, char *str, zval *destArray);
|
2002-05-11 11:41:17 +08:00
|
|
|
char *executable_location;
|
2002-11-13 04:56:47 +08:00
|
|
|
|
|
|
|
int php_ini_ignore;
|
2010-11-12 01:24:27 +08:00
|
|
|
int php_ini_ignore_cwd; /* don't look for php.ini in the current directory */
|
2003-01-15 19:22:04 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
int (*get_fd)(int *fd);
|
2003-01-15 19:22:04 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
int (*force_http_10)(void);
|
2003-01-21 19:03:58 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
int (*get_target_uid)(uid_t *);
|
|
|
|
int (*get_target_gid)(gid_t *);
|
2003-02-20 03:41:09 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
unsigned int (*input_filter)(int arg, char *var, char **val, size_t val_len, size_t *new_val_len);
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2003-03-18 23:53:33 +08:00
|
|
|
void (*ini_defaults)(HashTable *configuration_hash);
|
2003-03-19 04:52:52 +08:00
|
|
|
int phpinfo_as_text;
|
2006-09-20 04:33:12 +08:00
|
|
|
|
|
|
|
char *ini_entries;
|
2008-12-31 22:27:09 +08:00
|
|
|
const zend_function_entry *additional_functions;
|
2014-12-14 06:06:14 +08:00
|
|
|
unsigned int (*input_filter_init)(void);
|
1999-05-06 02:25:20 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-02-18 04:23:59 +08:00
|
|
|
struct _sapi_post_entry {
|
|
|
|
char *content_type;
|
|
|
|
uint content_type_len;
|
2014-12-14 06:06:14 +08:00
|
|
|
void (*post_reader)(void);
|
|
|
|
void (*post_handler)(char *content_type_dup, void *arg);
|
2000-02-18 04:23:59 +08:00
|
|
|
};
|
|
|
|
|
1999-05-06 02:25:20 +08:00
|
|
|
/* header_handler() constants */
|
|
|
|
#define SAPI_HEADER_ADD (1<<0)
|
|
|
|
|
|
|
|
|
|
|
|
#define SAPI_HEADER_SENT_SUCCESSFULLY 1
|
|
|
|
#define SAPI_HEADER_DO_SEND 2
|
|
|
|
#define SAPI_HEADER_SEND_FAILED 3
|
|
|
|
|
2000-02-25 06:00:47 +08:00
|
|
|
#define SAPI_DEFAULT_MIMETYPE "text/html"
|
2014-02-13 10:54:52 +08:00
|
|
|
#define SAPI_DEFAULT_CHARSET PHP_DEFAULT_CHARSET
|
1999-09-14 04:03:56 +08:00
|
|
|
#define SAPI_PHP_VERSION_HEADER "X-Powered-By: PHP/" PHP_VERSION
|
1999-05-06 02:25:20 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
#define SAPI_POST_READER_FUNC(post_reader) void post_reader(void)
|
|
|
|
#define SAPI_POST_HANDLER_FUNC(post_handler) void post_handler(char *content_type_dup, void *arg)
|
1999-05-26 05:14:54 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
#define SAPI_TREAT_DATA_FUNC(treat_data) void treat_data(int arg, char *str, zval* destArray)
|
|
|
|
#define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len)
|
2002-08-02 14:53:48 +08:00
|
|
|
|
2003-09-02 21:34:23 +08:00
|
|
|
BEGIN_EXTERN_C()
|
2001-08-16 02:01:48 +08:00
|
|
|
SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data);
|
|
|
|
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
|
2002-08-02 14:53:48 +08:00
|
|
|
SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data);
|
2003-02-20 03:41:09 +08:00
|
|
|
SAPI_API SAPI_INPUT_FILTER_FUNC(php_default_input_filter);
|
2003-09-02 21:34:23 +08:00
|
|
|
END_EXTERN_C()
|
1999-06-13 01:50:39 +08:00
|
|
|
|
2003-01-16 05:13:01 +08:00
|
|
|
#define STANDARD_SAPI_MODULE_PROPERTIES
|
1999-09-17 07:18:15 +08:00
|
|
|
|
2000-07-03 07:46:51 +08:00
|
|
|
#endif /* SAPI_H */
|
2000-02-25 06:00:47 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* End:
|
|
|
|
*/
|