static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC)
{
- zend_copy_ini_directives(TSRMLS_C);
- zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+ if (zend_copy_ini_directives(TSRMLS_C) == SUCCESS) {
+ zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
+ }
}
#endif
free(EG(zend_constants));
executor_globals_ctor(executor_globals, tsrm_ls);
global_persistent_list = &EG(persistent_list);
- zend_new_thread_end_handler(tsrm_thread_id() TSRMLS_CC);
+ zend_copy_ini_directives(TSRMLS_C);
#endif
}
return FAILURE;
}
zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
- zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
return SUCCESS;
}
#endif
}
+#ifdef ZTS
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC)
{
if (p->on_modify) {
{
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(long) stage TSRMLS_CC);
}
+#endif
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)