Skip to content

Commit 1890173

Browse files
author
foobar
committed
Revert
1 parent 8c4d1f6 commit 1890173

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

main/main.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,24 +1415,19 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
14151415

14161416
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index pointer", 0);
14171417

1418-
/* Initialize configuration_hash */
1419-
if (php_init_config_hash() == FAILURE) {
1420-
return FAILURE;
1421-
}
1422-
1423-
/* Register PHP core ini entries */
1424-
REGISTER_INI_ENTRIES();
1425-
1426-
/* Register Zend ini entries */
1427-
zend_register_standard_ini_entries(TSRMLS_C);
1428-
14291418
/* this will read in php.ini, set up the configuration parameters,
14301419
load zend extensions and register php function extensions
14311420
to be loaded later */
14321421
if (php_init_config(TSRMLS_C) == FAILURE) {
14331422
return FAILURE;
14341423
}
14351424

1425+
/* Register PHP core ini entries */
1426+
REGISTER_INI_ENTRIES();
1427+
1428+
/* Register Zend ini entries */
1429+
zend_register_standard_ini_entries(TSRMLS_C);
1430+
14361431
/* Disable realpath cache if safe_mode or open_basedir are set */
14371432
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
14381433
CWDG(realpath_cache_size_limit) = 0;

main/php_ini.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,6 @@ static void pvalue_config_destructor(zval *pvalue)
254254
}
255255
/* }}} */
256256

257-
/* {{{ php_init_config_hash
258-
*/
259-
int php_init_config_hash(void)
260-
{
261-
return zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1);
262-
}
263-
/* }}} */
264-
265257
/* {{{ php_init_config
266258
*/
267259
int php_init_config(TSRMLS_D)
@@ -278,6 +270,10 @@ int php_init_config(TSRMLS_D)
278270
int l, total_l=0;
279271
zend_llist_element *element;
280272

273+
if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1) == FAILURE) {
274+
return FAILURE;
275+
}
276+
281277
if (sapi_module.ini_defaults) {
282278
sapi_module.ini_defaults(&configuration_hash);
283279
}

main/php_ini.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "zend_ini.h"
2525

2626
BEGIN_EXTERN_C()
27-
int php_init_config_hash(void);
2827
int php_init_config(TSRMLS_D);
2928
int php_shutdown_config(void);
3029
void php_ini_register_extensions(TSRMLS_D);

0 commit comments

Comments
 (0)