php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42980 Extension DLL's calling improper path to helper DLL
Submitted: 2007-10-15 18:16 UTC Modified: 2007-11-12 10:23 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: p_hilyard at yahoo dot com Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 5.2.4 OS: Windows XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: p_hilyard at yahoo dot com
New email:
PHP Version: OS:

 

 [2007-10-15 18:16 UTC] p_hilyard at yahoo dot com
Description:
------------
The extensions for PHP are calling improper locations for their helper DLL's.  I have my server set up on my portable HDD and have configured Apache and PHP properly to reference to the drive.  All paths in the PHP.ini, and httpd.conf work perfectly.  The issue is that php_mcrypt.dll, php_mysql.dll, and php_mysqli.dll are calling the wrong path for their support DLL's.  They are using the machine's PATH variable instead of using the files relative to the install location.  (Ex. php_mysql.dll will search this current machine's PATH {C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Novell\ZENworks\} and not any other link.  The actual support DLL's {/phpdev5/php} are not being searched for.)  For this to work properly, i have to either copy the support DLL's into one of the PATH directories, or add a location to the PATH for it to search.  Either of the 2 options I am unwilling to do, as this should work perfectly off of one area.  (Note:  The PATH search did not take place in PHP4.  It called the support DLL's relative to the install location.)

This results in a non-functioning extension, and multiple errors from Apache.  

Final note, PHP 4 had no problem with the DLL's.  This is not an apache problem, as i'm using the same Apache that i used for PHP4, reconfigured of course!  And switching back to PHP4 doesn't give me the problem.

Reproduce code:
---------------
_start5.bat:
/phpdev5/php/php.exe -c /phpdev5/php.ini -f /phpdev5/start.php
**END**

start.php:
<? 
echo "PHP5 / Apache 2 Startup!......\n";
echo "starting MySQL ....\n"; 
pclose( popen('start phpdev5\\mysql\\bin\\mysqld-nt.exe --basedir=/phpdev5/mysql --datadir=/phpdev5/mysql/data --port=3306 --console --standalone'        ,'r' )     ); 
echo "starting apache....\n"; 
flush(); 
pclose(popen('start phpdev5\\Apache2\\bin\\apache.exe','r')); 
flush(); 
sleep(5); 
echo 'opening localhost'; 
exec( 'start http://localhost:80'); 
?>
**END**



Expected result:
----------------
_start5.bat runs start.php through PHP.
start.php:

Echos a message, then starts MySQL.
Echos a message, then starts Apache2.
Opens an IExplroe window to localhost.
Script ends.

Actual result:
--------------
Start.bat successfully executes, calling start.php.

Start.php successfully starts MySQL after the echo.
Start.php starts Apache2 after the echo.
Apache2 errors stating PHP is unable to load libmysql.dll and libmcrypt.dll.
(This application has failed to start because LIBMYSQL.dll (or libmcrypt.dll) was not found.  Re-installing the application may fix this problem.)
Apache2 does not shut down, but keeps running without mcrypt and mysql(i) support.
IExplore opens successfully.
Script ends.

Apache ERROR LOG:


[Mon Oct 15 10:31:11 2007] [notice] Apache/2.0.59 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Mon Oct 15 10:31:11 2007] [notice] Server built: Jul 27 2006 15:55:03
[Mon Oct 15 10:31:11 2007] [notice] Parent: Created child process 3904
PHP Warning:  PHP Startup: Unable to load dynamic library '\\phpdev5\\php\\ext\\php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '\\phpdev5\\php\\ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Mon Oct 15 10:31:12 2007] [notice] Child 3904: Child process is running
[Mon Oct 15 10:31:12 2007] [notice] Child 3904: Acquired the start mutex.
[Mon Oct 15 10:31:12 2007] [notice] Child 3904: Starting 250 worker threads.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-06 19:51 UTC] p_hilyard at yahoo dot com
Ok, just a clarification as why i'm unable to change the PATH.  Most of my devel work takes place on my mobile HDD (like i said) which gets hooked to computers with DeepFreeze on them.  Upon updating the PATH, i need to restart windows to get it to accept the change.  DeepFreeze resets all files and settings to a previous state, which doesn't have the proper PATH.  I can not disable DF due to the computers being owned by the state.  If there is any way to create a variable or something in php.ini to force use of a defined path within the ini, it would be lovely.  Otherwise, it would be nice to set php to refer to the proper directory for module extensions (../).

Thank you!
Paden
 [2007-11-12 10:23 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 18:01:30 2024 UTC