#33899 [Opn->Csd]: setting both extension_dir and extension= on command line doesn't work
| From: | sniper@php.net | Date: | Fri, 29 Jul 2005 13:25:37 +0000 |
| Subject: | #33899 [Opn->Csd]: setting both extension_dir and extension= on command line doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82662@lists.php.net to get a copy of this message | ||
ID: 33899
Updated by: sniper@php.net
Reported By: hartmut@php.net
-Status: Open
+Status: Closed
Bug Type: Dynamic loading
Operating System: linux
PHP Version: 5CVS-2005-07-28 (dev)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-07-28 12:32:35] hholzgra@php.net
ext/standard/dl.c has the following code in php_dl():
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;
}
} else {
extension_dir = PG(extension_dir);
}
extensions loaded from command line take the MODULE_PERSISTANT path but
debug output shows that PG(extension_dir) shows the new extension_dir
set by the command line option just fine ...
------------------------------------------------------------------------
[2005-07-28 12:30:52] hartmut@php.net
Description:
------------
I try to test a newly created PECL extension, the extension shared
object file has been created in ./modules/myext.so
when i do a "make install" to copy the myext.so to the default
extension
directory first i can load it just fine using either "php -d
'extension=myext.so'"
or using dl("myext.so"); within my code
when i start php with "php -d 'extension_dir=./modules'" i can use
dl("myext.so"); within my code just fine, too. the extension is loaded
from ./modules as expected
but when i try to use both commandline options
php -d 'extension_dir=./modules' -d 'extension=myext.so'
myext.so is either loaded from the default extension_dir,
not ./modules, or it is not loaded at all if not present in the
default extension dir
Expected result:
----------------
-d 'extension_dir=...' should take effect right away if given on the
command line, even for following -d 'extension=...' options
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33899&edit=1