ID: 33899 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Dynamic loading Operating System: linux PHP Version: 5CVS-2005-07-28 (dev) New Comment:
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 ... Previous Comments: ------------------------------------------------------------------------ [2005-07-28 12:30:52] [EMAIL PROTECTED] 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