From: aren at cambre dot biz Operating system: Windows Server 2003 PHP version: 5.1.6 PHP Bug Type: Unknown/Other Function Bug description: extension_dir has no effect on Windows
Description: ------------ extension_dir (in php.ini) has no effect in Windows. I installed a relatively clean installation of PHP 5.1.6 on Windows 2003. I configured the extension_dir line in php.ini using all these forms: extension_dir = c:\PHP\ext extension_dir = c:\php\ext extension_dir = c:/PHP/ext extension_dir = "c:\php\ext" Regardless of the form used, php does not even attempt to search the c:\php\ext directory to find extensions. Reproduce code: --------------- 1. Install php 5.1.6 on a clean Windows system. Only configure what is necessary to get it running. Be sure to set extension_dir to your actual ext directory. (Preferably, c:\php\ext.) Do a hello world php to test functionality. 2. Uncomment this line in php.ini: extension=php_mysql.dll 3. Download the latest phpMyAdmin. Extract files and copy to a directory in your web server. 4. Get File Monitor from sysinternals (www.sysinternals.com). 5. Load File Monitor, and set its filter to php_mysql.dll. (This is so that it just reports on attempts to find php_mysql.dll and not hundreds of other filesystem hits.) 6. Start File Monitor so that it's catching filesystem hits. 7. Browse myPhpAdmin's index.php in a browser. You'll get an error saying that the mysql drivers cannot be used. 8. Go back to File Monitor. Notice how none of the directories searched were the directory specified in extension_dir. Installing mySql is optional. Its presence has no effect on the above problem. (Of course, if the system actually found php_mysql.dll, then it would be a problem if mySql was not installed!) Expected result: ---------------- phpMyAdmin should find the mySql extension, and File Monitor should confirm that php actually searches the c:\php\ext directory for the extensions. Actual result: -------------- Php searches all directories in the system path! extension_dir has no effect under Windows. You have to add c:\php AND c:\php\ext to the system path. I think this is likely an application bug because the documentation is quite clear on how extension_dir should be configured. -- Edit bug report at http://bugs.php.net/?id=39316&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39316&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39316&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39316&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39316&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39316&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39316&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39316&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39316&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39316&r=support Expected behavior: http://bugs.php.net/fix.php?id=39316&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39316&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39316&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39316&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39316&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39316&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39316&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39316&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39316&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39316&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39316&r=mysqlcfg