NULL,
NULL,
PHP_MINFO(nsapi),
- "$Id$",
+ "$Revision$",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
TSRMLS_FETCH();
+ /* check if this uri was included in an other PHP script with virtual()
+ by looking for a request context in the current thread */
+ if (SG(server_context)) {
+ /* send 500 internal server error */
+ log_error(LOG_WARN, "php4_execute", sn, rq, "Cannot make nesting PHP requests with virtual()");
+ protocol_status(sn, rq, 500, NULL);
+ return REQ_ABORTED;
+ }
+
request_context = (nsapi_request_context *)MALLOC(sizeof(nsapi_request_context));
request_context->pb = pb;
request_context->sn = sn;
nsapi_free((void*)(SG(request_info).content_type));
FREE(request_context);
+ SG(server_context) = NULL;
return retval;
}