ID:               39316
 Comment by:       noah dot rusnock at echo-digitaldesign dot com
 Reported By:      aren at cambre dot biz
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows Server 2003
 PHP Version:      5.1.6
 New Comment:

I just setup a Windows 2000 SP4 virtual machine using Microsoft
VirturalPC 2007 beta. I used the exact same setup as I did for my
Windows XP (non-virtual machine) Apache server with PHP and I am still
unable to load any extensions.


Previous Comments:
------------------------------------------------------------------------

[2006-11-02 20:50:11] noah dot rusnock at echo-digitaldesign dot com

I have been dealing with this problem for months! I am using Windows XP
SP2 with Apache 2.0.59 and PHP 5.1.6. I think I have had this issue
since 5.1.4 or 5.1.3; I don't remember. I am new to PHP and Apache, but
setup my own localhost server earlier this year (2006) and have had this
problem from the beginning. (I added a vote, but submitted it as a 3;
should be a 5; I need this working to start learning MySQL)

------------------------------------------------------------------------

[2006-10-31 19:51:40] aren at cambre dot biz

That did not fix it. I deleted everything in C:\php, including
directories, except for php.ini. Then I copied over the contents of
php5.2-win32-latest.zip and did an iisreset (a command line program
that restarts the web server).

By the way, it looks like php is checking a couple of additional
directories besides those specified in the path. Here is my path (each
directory on a separate line):
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
c:\Program Files\Intel\DMIX
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\
c:\Program Files\Microsoft SQL Server\90\Tools\binn\
c:\php

Here is what PHP checks:
C:\windows\system32\inetsrv\php_mysql.dll
C:\WINDOWS\system32\php_mysql.dll
C:\WINDOWS\system\php_mysql.dll
C:\WINDOWS\php_mysql.dll
C:\WINDOWS\system32\inetsrv\php_mysql.dll
C:\WINDOWS\system32\php_mysql.dll
C:\WINDOWS\php_mysql.dll
C:\WINDOWS\System32\Wbem\php_mysql.dll
C:\Program Files\Intel\DMIX\php_mysql.dll
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\php_mysql.dll
C:\Program Files\Microsoft SQL Server\90\Tools\binn\php_mysql.dll
C:\php\php_mysql.dll

PHP follows the path exactly starting with the 6th line. The first 5
lines are some unknown set of directories.

PHP checks those directories twice in a row.

------------------------------------------------------------------------

[2006-10-31 11:32:17] [EMAIL PROTECTED]

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



------------------------------------------------------------------------

[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
  • #39316 [Com]: extension_dir... noah dot rusnock at echo-digitaldesign dot com
    • #39316 [Com]: extensio... noah dot rusnock at echo-digitaldesign dot com

Reply via email to