#39316 [Opn->Fbk]: extension_dir has no effect on Windows
ID: 39316
Updated by: bjori@php.net
Reported By: aren at cambre dot biz
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Windows Server 2003
PHP Version: 5.1.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-10-31 04:49:18] aren at cambre dot biz
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 this bug report at http://bugs.php.net/?id=39316&edit=1
Thread (10 messages)