php_request_shutdown(NULL);
}
+static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
+{
+ if (strcmp(r->protocol, "INCLUDED")) {
+ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
+ }
+ if (p) {
+ ((php_struct *)SG(server_context))->r = p;
+ } else {
+ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup);
+ }
+}
+
static int php_handler(request_rec *r)
{
php_struct *ctx;
request_rec *parent_req = NULL;
TSRMLS_FETCH();
-#define PHPAP_INI_OFF \
- if (strcmp(r->protocol, "INCLUDED")) { \
- zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
- } \
- apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); \
+#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
conf = ap_get_module_config(r->per_dir_config, &php5_module);