static void php_apache_request_shutdown(void *dummy)
{
SLS_FETCH();
+ APLS_FETCH();
+ AP(in_request)=0;
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
php_request_shutdown(dummy);
}
PLS_FETCH();
APLS_FETCH();
- if (r->assbackwards && r->protocol && !strcmp(r->protocol, "INCLUDED")) {
+ if (AP(in_request)) {
zend_file_handle fh;
fh.filename = r->filename;
zend_execute_scripts(ZEND_INCLUDE CLS_CC ELS_CC, 1, &fh);
return OK;
}
+ AP(in_request)=1;
if (setjmp(EG(bailout))!=0) {
return OK;
long last_modified;
long xbithack;
long terminate_child;
+ zend_bool in_request;
} php_apache_info_struct;
extern zend_module_entry apache_module_entry;
PHP_INI_END()
+
+static void php_apache_globals_ctor(php_apache_info_struct *apache_globals)
+{
+ apache_globals->in_request = 0;
+}
+
+
static PHP_MINIT_FUNCTION(apache)
{
#ifdef ZTS
- php_apache_info_id = ts_allocate_id(sizeof(php_apache_info_struct), NULL, NULL);
+ php_apache_info_id = ts_allocate_id(sizeof(php_apache_info_struct), ts_allocate_ctor, NULL);
+#else
+ php_apache_globals_ctor(&php_apache_info);
#endif
REGISTER_INI_ENTRIES();
return SUCCESS;