From:             
Operating system: Windows 2003 / Doesn't matter
PHP version:      5.3.2
Package:          *Configuration Issues
Bug Type:         Bug
Bug description:PHP defaults to C:\PHP5 folder when loading extension

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 bug report at http://bugs.php.net/bug.php?id=51299&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51299&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51299&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51299&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51299&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51299&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51299&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51299&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51299&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51299&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51299&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51299&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51299&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51299&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51299&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51299&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51299&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51299&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51299&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51299&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51299&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51299&r=mysqlcfg

Reply via email to