php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49310 Default install fails to load dll libraries
Submitted: 2009-08-20 11:36 UTC Modified: 2009-08-21 14:32 UTC
From: markvanrossum at yahoo dot co dot uk Assigned:
Status: Not a bug Package: Windows Installer
PHP Version: 5.2.10 OS: Windows XP
Private report: No CVE-ID: None
 [2009-08-20 11:36 UTC] markvanrossum at yahoo dot co dot uk
Description:
------------
Using a default install of the MSI, choosing "no webserver" and then running php from the command line returns a popup box of:
"This application has failed to start because xxx.dll was not found.  Re-installing the application may fix the problem"

and text into the console of 

"PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php\ext\xxxx.dll' - The specified module could not be found.
 in Unknown on line 0"

for some extensions that are enabled.  Some other extensions load OK.  

After doing lots of research, it seems that some extensions require additional dll files from vendors.  The installer should warn of this when you choose the extension.  The error message above is wrong where it says "because xxx.dll was not found" and "The specified module could not be found" and there are many posts on internet forums from people trying to fix this issue by checking their extension_dir etc.

Expected result:
----------------
PHP to run cleanly with no errors after a default install with no configuration changes.  If more dlls are required from vendors then this to be stated, rather than the incorrect message "The specified module could not be found"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-20 13:29 UTC] kalle@php.net
Is this for any specific extensions? Does it help to add "C:\php\" to your PATH env variable?
 [2009-08-21 11:08 UTC] markvanrossum at yahoo dot co dot uk
An example of one that this applies to is the Oracle OCI extension.  It is documented at 
http://www.php.net/manual/en/install.windows.extensions.php 
that this needs additional libraries from Oracle, but PHP should alert to this.  The error message it generates that it can't find oci.dll is incorrect.  

Adding "c:\php\" to the path won't help because the additional dll's it needs aren't installed at this point.  However, I spent quite a bit of time trying things like that before realising why it wouldn't work.
 [2009-08-21 12:35 UTC] pajoye@php.net
It is your responsibility to install the oracle client correctly, and we do not distribute them.

Not a bug > bogus.
 [2009-08-21 14:32 UTC] markvanrossum at yahoo dot co dot uk
Yes I know that!!!

Did you read my original report?

I will clarify with an example. eg for OCI8, the popup box states:
"This application has failed to start because oci.dll was not found. 
Re-installing the application may fix the problem"

and text into the console of 

"PHP Warning:  PHP Startup: Unable to load dynamic library
'C:\php\ext\oci.dll' - The specified module could not be found.
 in Unknown on line 0"

An install DOES CONTAIN oci.dll in "C:\php\ext\", (obviously you have to choose it in the installer) so stating "The specified module could not be found." is INCORRECT and leads to a lot of time wasted checking extension paths etc. 

What it can't find is the oracle dlls, which until you find the page buried on the PHP website isn't stated anywhere.  It would help if the message stated you need to install the extra libraries, rather than "oci.dll could not be found" when it CAN be found, it just needs EXTRA libraries from Oracle.  Clear?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC