php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48323 files load at command line, but not through apache.
Submitted: 2009-05-18 23:21 UTC Modified: 2009-05-19 10:51 UTC
From: davebastow at yahoo dot com dot au Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 5.2.9 OS: Win32 (XP SP3)
Private report: No CVE-ID: None
 [2009-05-18 23:21 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-19 06:09 UTC] carsten_sttgt at gmx dot de
> 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
 [2009-05-19 10:51 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


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