Edit report at http://bugs.php.net/bug.php?id=51299&edit=1

 ID:               51299
 Updated by:       [email protected]
 Reported by:      mariusads at helpedia dot com
 Summary:          PHP defaults to C:\PHP5 folder when loading extension
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          *Configuration Issues
 Operating System: Windows 2003 / Doesn't matter
 PHP Version:      5.3.2

 New Comment:

Already a report about this change request.


Previous Comments:
------------------------------------------------------------------------
[2010-03-14 22:40:31] mariusads at helpedia dot com

Description:
------------
I've reported this some time ago for another version of PHP.



Tried installing PHP 5.3.2 on Windows 2003. 

Extracted contents to C:\PHP

Copied php.ini-development to C:\Windows\php.ini and remove the ";" from
some extensions

Rebooted Apache.

PHP pops error messages saying it can't load C:\PHP5\ext\php_mysql.dll
and so on.



"C:\php5" seems to be hardcoded in php5ts.dll, as "c:\php5\pear" is.



I believe this is wrong behavior.



First of all, PHP is configured to load PHP using this config. entry:



LoadModule php5_module "C:/php/php5apache2.dll"



Using File Monitor from SysInternals, I can see C:\php\php5ts.dll is
loaded next, and C:\Windows\php.ini is used.



In the php.ini the default text for both development AND production is
this:



; Directory in which the loadable extensions (modules) reside.

; http://php.net/extension-dir

; extension_dir = "./"

; On windows:

; extension_dir = "ext"



As these are commented by default, I believe a regular user would assume
PHP would look for the extensions in [folder where php5ts.dll is] \ ext
or more precisely "C:\php\ext", or in the worst case "C:\php". 



Nowhere in the documentation or in the ini file, there is any mention of
"c:\php5"



Of course, if I un-comment the setting and specify it as :

extension_dir = "ext"

php will report the following error: 

PHP Startup: Unable to load dynamic library 'ext\php_bz2.dll" and so on,
so the default value is wrong.



I think the version ".\ext" should be accepted as "." signifies the
current folder - but it's not, the only accepted version is to write the
full path, "C:\php\ext"







Expected result:
----------------
When the extension_dir is commented out (the default in php.ini), the
php library should look for the extensions in the EXT folder inside the
folder where the library resides. Not a hardcoded C:\PHP5.



On Windows, if there's no drive letter or network path at the start of
the value, it should be assumed it means a sub-folder in the folder
where the library resides.



As it is right now in the php.ini, if the value "ext" is there and
php5ts.dll resides in "C:\php" or for example "c:\program files\php",
php should look for extensions in "c:\php\ext" or "c:\program
files\php\ext"



Also this is probably unrelated or reported as another bug, but
php_exif.dll does not load, even if it's in c:\php\ext  I don't know if
it depends on something.

Actual result:
--------------
Extensions shouldn't be loaded from a hardcoded folder, as I already
said.


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



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51299&edit=1

Reply via email to