diff options
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 6b0ab4876d..1234f91051 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -71,6 +71,9 @@ /* A way to specify the location of the php.ini dir in an apache directive */ char *apache2_php_ini_path_override = NULL; +#ifdef ZTS +ZEND_TSRMLS_CACHE_DEFINE; +#endif static size_t php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC) @@ -451,6 +454,8 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp } #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + (void)ts_resource(0); + ZEND_TSRMLS_CACHE_UPDATE; #endif sapi_startup(&apache2_sapi_module); apache2_sapi_module.startup(&apache2_sapi_module); @@ -543,6 +548,7 @@ static int php_handler(request_rec *r) #ifdef ZTS /* initial resource fetch */ void ***tsrm_ls = ts_resource(0); + ZEND_TSRMLS_CACHE_UPDATE; #endif #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC); |