#48323 [Com]: files load at command line, but not through apache.
| From: | carsten_sttgt at gmx dot de | Date: | Tue, 19 May 2009 06:09:52 +0000 |
| Subject: | #48323 [Com]: files load at command line, but not through apache. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-137478@lists.php.net to get a copy of this message | ||
ID: 48323
Comment by: carsten_sttgt at gmx dot de
Reported By: davebastow at yahoo dot com dot au
Status: Open
Bug Type: Dynamic loading
Operating System: Win32 (XP SP3)
PHP Version: 5.2.9
New Comment:
> but if I try to load any of "php_mysql.dll",
> "php_mysqli.dll" or "php_mcrypt.dll"
>
> "PHP Startup: Unable to load dynamic library
All of these extensions needs additional dlls. They are usual in the
PHP directory.
--> add the PHP directory to the (system) PATH environment variable.
(Maybe a restart is required).
See:
http://de.php.net/manual/en/install.windows.extensions.php
Previous Comments:
------------------------------------------------------------------------
[2009-05-18 23:21:12] davebastow at yahoo dot com dot au
Description:
------------
I can repeat the behaviour reported by "usai roberto" in bug #5764
(http://bugs.php.net/bug.php?id=5764) but this bug is closed so I
cannot add to it.
It relates to loading extension dll files. I can load the extension
"php_gd2.dll", but if I try to load any of "php_mysql.dll",
"php_mysqli.dll" or "php_mcrypt.dll"
When I start apache (which attempts to load php as a module) I get a
pop-up saying:
"PHP Startup: Unable to load dynamic library
'c:\server\php\ext\php_mcrypt.dll' - The specified module could not be
found"
Similar messages appear for the other two mysql dll files also. Then
a second series of three identical popups is displayed. Apache still
runs, and php is available, but as soon as, for example mysql is
accessed in a script I get the familiar "Fatal error: Call to
undefined function mysql_connect()..."
Importantly, all four of these files are within the same directory
which I can guarantee is that referred to by my php.ini file. And
seeing as php_gd2.dll is accessed, one would assume that the
extension_dir value is correctly set.
Interestingly these errors only occur when using php via apache.
That is, if I run "php -i" from the command line, no such error
occurs. Comparing the output from php -i to that of the <?php
phpinfo(); ?> command (accessed via apache) I can see that the value
of "extension_dir" and "Loaded configuration File" show exactly the
same values in both. However the "php -i" version contains a mysql
and mysqli section whereas the webpage version does not.
I've been playing with this for literally days now, and would REALLY
love a solution.
My software versions are as follows:
PHP 5.2.9-2 (cli) (built: Apr 9 2009 08:23:19)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Apache
Server version: Apache/2.2.11 (Win32)
Server built: Dec 10 2008 00:10:06
Mysql (not that I think it matters)
mysqld Ver 5.1.34-community for Win32 on ia32 (MySQL Community Server
(GPL))
Windows XP
Home Edition
Version 2002
Service Pack 3
Will be happy to provide any further information.
Kind Regards,
David Bastow
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48323&edit=1