summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-21 17:28:54 +0000
committerZeev Suraski <zeev@php.net>1999-04-21 17:28:54 +0000
commit7aad23132703ae2ab35b9faf1bc955af8376e03e (patch)
tree812302a2cff847519b05a468d3f811ce6c68e449 /main
parenta9f9ae792030e99b6552ff9090cc8e808d148fc1 (diff)
downloadphp-git-7aad23132703ae2ab35b9faf1bc955af8376e03e.tar.gz
Thread safety patch. It works now with just-in-time resource initialization!
Diffstat (limited to 'main')
-rw-r--r--main/configuration-parser.y3
-rw-r--r--main/main.c2
-rw-r--r--main/php_ini.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/main/configuration-parser.y b/main/configuration-parser.y
index f89987b63b..b54079d6e0 100644
--- a/main/configuration-parser.y
+++ b/main/configuration-parser.y
@@ -167,6 +167,7 @@ int php3_init_config(void)
{
char *env_location,*default_location,*php_ini_path;
int safe_mode_state = PG(safe_mode);
+ char *open_basedir = PG(open_basedir);
char *opened_path;
int free_default_location=0;
@@ -209,12 +210,14 @@ int php3_init_config(void)
strcpy(php_ini_path,default_location);
}
PG(safe_mode) = 0;
+ PG(open_basedir) = NULL;
cfgin = php3_fopen_with_path("php3.ini","r",php_ini_path,&opened_path);
free(php_ini_path);
if (free_default_location) {
free(default_location);
}
PG(safe_mode) = safe_mode_state;
+ PG(open_basedir) = open_basedir;
if (!cfgin) {
# if WIN32|WINNT
diff --git a/main/main.c b/main/main.c
index db7f3f7a41..b46b261b8a 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1199,7 +1199,7 @@ static void php3_parse(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
if (setjmp(EG(bailout))!=0) {
return;
}
- _php3_hash_environment();
+ _php3_hash_environment(PLS_C);
#if WIN32||WINNT
UpdateIniFromRegistry(primary_file->filename);
diff --git a/main/php_ini.c b/main/php_ini.c
index 406f5ac79b..a58c0ba9d9 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -105,6 +105,9 @@ int php_register_ini_entries(php_ini_entry *ini_entry, int module_number)
php_unregister_ini_entries(module_number);
return FAILURE;
}
+ if (hashed_ini_entry->on_modify) {
+ hashed_ini_entry->on_modify(hashed_ini_entry, hashed_ini_entry->value, hashed_ini_entry->value_length, hashed_ini_entry->mh_arg);
+ }
if ((default_value=cfg_get_entry(p->name, p->name_length))) {
if (!hashed_ini_entry->on_modify
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value->value.str.val, default_value->value.str.len, hashed_ini_entry->mh_arg)==SUCCESS) {