@ PHP inside a threaded Apache2 MPM. (Rasmus)
#include "http_main.h"
#include "util_script.h"
#include "http_core.h"
+#include "ap_mpm.h"
#include "php_apache.h"
static int php_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
+#ifndef ZTS
+ int threaded_mpm;
+
+ ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded_mpm);
+ if(threaded_mpm) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, 0, 0, "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.");
+ return DONE;
+ }
+#endif
/* When this is NULL, apache won't override the hard-coded default
* php.ini path setting. */
apache2_php_ini_path_override = NULL;