|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-11-06 19:51 UTC] p_hilyard at yahoo dot com
[2007-11-12 10:23 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 07:00:01 2025 UTC |
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.