From b325b340b7694738af6ef29872d957c1c47f74c7 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 29 Jul 2005 13:25:33 +0000 Subject: [PATCH] - Fixed bug #33899 (CLI: setting extension_dir=some/path extension=foobar.so does not work) --- NEWS | 2 ++ ext/standard/dl.c | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 68e2086f8d..8d10f9218e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2005, PHP 5.1 - Fixed bug #33917 (number_format() output with > 1 char separators). (Jani) +- Fixed bug #33899 (CLI: setting extension_dir=some/path extension=foobar.so + does not work). (Jani) - Fixed bug #33882 (CLI was looking for php.ini in wrong path). (Hartmut) - Fixed bug #33869 (strtotime() problem with "+1days" format). (Ilia) - Fixed bug #33841 (pdo sqlite driver forgets to update affected column count diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 278950d5fa..a9a31c8f57 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -23,7 +23,9 @@ #include "php.h" #include "dl.h" #include "php_globals.h" +#include "php_ini.h" #include "ext/standard/info.h" + #include "SAPI.h" #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H @@ -108,16 +110,13 @@ void php_dl(zval *file, int type, zval *return_value TSRMLS_DC) int error_type; char *extension_dir; - if (type==MODULE_PERSISTENT) { - /* Use the configuration hash directly, the INI mechanism is not yet initialized */ - if (cfg_get_string("extension_dir", &extension_dir)==FAILURE) { - extension_dir = PHP_EXTENSION_DIR; - } + if (type == MODULE_PERSISTENT) { + extension_dir = INI_STR("extension_dir"); } else { extension_dir = PG(extension_dir); } - if (type==MODULE_TEMPORARY) { + if (type == MODULE_TEMPORARY) { error_type = E_WARNING; } else { error_type = E_CORE_WARNING; -- 2.50.1