27#define SAPI_OPTION_NO_CHDIR 1
28#define SAPI_POST_BLOCK_SIZE 0x4000
32# define SAPI_API __declspec(dllexport)
34# define SAPI_API __declspec(dllimport)
36#elif defined(__GNUC__) && __GNUC__ >= 4
37# define SAPI_API __attribute__ ((visibility("default")))
127#define REQUEST_PARSE_BODY_OPTION_GET(name, fallback) \
128 (SG(request_parse_body_context).options_cache[REQUEST_PARSE_BODY_OPTION_ ## name].set \
129 ? SG(request_parse_body_context).options_cache[REQUEST_PARSE_BODY_OPTION_ ## name].value \
156# define SG(v) ZEND_TSRMG_FAST(sapi_globals_offset, sapi_globals_struct *, v)
158SAPI_API extern size_t sapi_globals_offset;
160# define SG(v) (sapi_globals.v)
204#define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1)
247 size_t (*
ub_write)(
const char *str,
size_t str_length);
250 char *(*getenv)(
const char *
name,
size_t name_len);
282 unsigned int (*
input_filter)(
int arg,
const char *var,
char **
val,
size_t val_len,
size_t *new_val_len);
300#define SAPI_HEADER_ADD (1<<0)
303#define SAPI_HEADER_SENT_SUCCESSFULLY 1
304#define SAPI_HEADER_DO_SEND 2
305#define SAPI_HEADER_SEND_FAILED 3
307#define SAPI_DEFAULT_MIMETYPE "text/html"
308#define SAPI_DEFAULT_CHARSET PHP_DEFAULT_CHARSET
309#define SAPI_PHP_VERSION_HEADER "X-Powered-By: PHP/" PHP_VERSION
311#define SAPI_POST_READER_FUNC(post_reader) void post_reader(void)
312#define SAPI_POST_HANDLER_FUNC(post_handler) void post_handler(char *content_type_dup, void *arg)
314#define SAPI_TREAT_DATA_FUNC(treat_data) void treat_data(int arg, char *str, zval* destArray)
315#define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, const char *var, char **val, size_t val_len, size_t *new_val_len)
324#define STANDARD_SAPI_MODULE_PROPERTIES \
SAPI_API sapi_module_struct sapi_module
SAPI_API int sapi_add_header_ex(const char *header_line, size_t header_line_len, bool duplicate, bool replace)
SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
sapi_globals_struct sapi_globals
SAPI_API int sapi_register_default_post_reader(void(*default_post_reader)(void))
SAPI_API zend_stat_t * sapi_get_stat(void)
SAPI_API int sapi_register_post_entries(const sapi_post_entry *post_entry)
SAPI_API double sapi_get_request_time(void)
SAPI_API int sapi_register_treat_data(void(*treat_data)(int arg, char *str, zval *destArray))
SAPI_API char * sapi_get_default_content_type(void)
SAPI_API void sapi_terminate_process(void)
SAPI_API sapi_module_struct sapi_module
#define SAPI_POST_READER_FUNC(post_reader)
SAPI_API int sapi_send_headers(void)
SAPI_API void sapi_initialize_empty_request(void)
SAPI_API void sapi_add_request_header(const char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg)
SAPI_API void sapi_activate_headers_only(void)
SAPI_API int sapi_register_input_filter(unsigned int(*input_filter)(int arg, const char *var, char **val, size_t val_len, size_t *new_val_len), unsigned int(*input_filter_init)(void))
SAPI_API int sapi_get_target_gid(gid_t *)
SAPI_API int sapi_flush(void)
SAPI_API void sapi_free_header(sapi_header_struct *sapi_header)
SAPI_API char * sapi_getenv(const char *name, size_t name_len)
#define SAPI_INPUT_FILTER_FUNC(input_filter)
SAPI_API void sapi_unregister_post_entry(const sapi_post_entry *post_entry)
SAPI_API void sapi_read_post_data(void)
SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header)
struct _sapi_globals_struct sapi_globals_struct
SAPI_API void sapi_activate(void)
SAPI_API void sapi_deactivate_destroy(void)
SAPI_API int sapi_get_fd(int *fd)
request_parse_body_option
@ REQUEST_PARSE_BODY_OPTION_post_max_size
@ REQUEST_PARSE_BODY_OPTION_upload_max_filesize
@ REQUEST_PARSE_BODY_OPTION_max_multipart_body_parts
@ REQUEST_PARSE_BODY_OPTION_max_file_uploads
@ REQUEST_PARSE_BODY_OPTION_max_input_vars
SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len)
SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen)
struct _sapi_module_struct sapi_module_struct
SAPI_API void sapi_deactivate(void)
SAPI_API int sapi_register_post_entry(const sapi_post_entry *post_entry)
SAPI_API void sapi_handle_post(void *arg)
SAPI_API void sapi_deactivate_module(void)
struct _sapi_post_entry sapi_post_entry
SAPI_API void sapi_startup(sapi_module_struct *sf)
SAPI_API int sapi_force_http_10(void)
SAPI_API int sapi_get_target_uid(uid_t *)
SAPI_API void sapi_shutdown(void)
#define SAPI_TREAT_DATA_FUNC(treat_data)
printf(string $format, mixed ... $values)
unsigned char headers_sent
sapi_request_info request_info
sapi_headers_struct sapi_headers
HashTable * rfc1867_uploaded_files
double global_request_time
HashTable known_post_content_types
zend_fcall_info_cache fci_cache
sapi_request_parse_body_context request_parse_body_context
unsigned int(* input_filter)(int arg, const char *var, char **val, size_t val_len, size_t *new_val_len)
int(* send_headers)(sapi_headers_struct *sapi_headers)
int(* startup)(struct _sapi_module_struct *sapi_module)
size_t(* ub_write)(const char *str, size_t str_length)
void(* terminate_process)(void)
void(* log_message)(const char *message, int syslog_type_int)
void(* treat_data)(int arg, char *str, zval *destArray)
int(* get_target_uid)(uid_t *)
int(* shutdown)(struct _sapi_module_struct *sapi_module)
void(* flush)(void *server_context)
unsigned int(* input_filter_init)(void)
char * php_ini_path_override
void(* default_post_reader)(void)
void int(* header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers)
void(* sapi_error)(int type, const char *error_msg,...) ZEND_ATTRIBUTE_FORMAT(printf
void(* ini_defaults)(HashTable *configuration_hash)
char * executable_location
int(* force_http_10)(void)
const zend_function_entry * additional_functions
int(* get_target_gid)(gid_t *)
void(* register_server_variables)(zval *track_vars_array)
size_t(* read_post)(char *buffer, size_t count_bytes)
zend_result(* get_request_time)(double *request_time)
void(* send_header)(sapi_header_struct *sapi_header, void *server_context)
void(* post_reader)(void)
uint32_t content_type_len
void(* post_handler)(char *content_type_dup, void *arg)
sapi_post_entry * post_entry
struct _php_stream * request_body
const char * request_method
const char * content_type
struct _zend_fcall_info_cache zend_fcall_info_cache
struct _zend_function_entry zend_function_entry
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
struct _zend_llist zend_llist
#define ZEND_ATTRIBUTE_FORMAT(type, idx, first)
struct _zend_array HashTable
ZEND_RESULT_CODE zend_result