From:             p_hilyard at yahoo dot com
Operating system: Windows XP Pro
PHP version:      5.2.4
PHP Bug Type:     Dynamic loading
Bug description:  Extension DLL's calling improper path to helper DLL

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.

-- 
Edit bug report at http://bugs.php.net/?id=42980&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42980&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42980&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42980&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42980&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42980&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42980&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42980&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42980&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42980&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42980&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42980&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42980&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42980&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42980&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42980&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42980&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42980&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42980&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42980&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42980&r=mysqlcfg

Reply via email to