Jump to content

PHP fails to load some modules


Recommended Posts

I've had PHP 5.2.10 installed on my machine for a while, for running a number of websites locally. No problems with any of them.

 

But I wanted to improve my PHP so I got a book on it and started working through it, and hit a problem when I tried to use a mysqli function. I checked Apache's logs, and saw that there are five DLLs failing to load:

  • php_mysqli.dll
  • php_oci8.dll
  • php_pdo_oci.dll
  • php_pdo_oci8.dll
  • php_pdo_sqlite_external.dll

 

The same error message for all of them:

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

 

All five dll's ARE present in the c:\php\ext directory. The windows path has PHP in it. phpinfo() confirms I'm editing the right php.ini file, which has c:\php\ext correctly set. The other dll's, including plain mysql, are in the same directory and work perfectly. There are no PHP dll's in the system32 directory

 

I've been googling all afternoon and I've run out of suggestions people have made to fix errors like this. Why is it having this trouble with these five DLLs??

Link to comment
Share on other sites

I believe it was from the installer originally.

 

But one of the pieces of advice I came across for fixing this problem was that the zip file contained a number of DLLs in C:\PHP that the installer doesn't, which might be the cause. So I downloaded the zip and copied across the missing DLL's, with no improvement.

 

So at the moment, it's in a bit of an in-between state. But it's mostly installer.

Link to comment
Share on other sites

The .msi installer expects you to use the Windows control panel to add/remove php extensions, which is why the .dll files are not present in the ext folder. They are put there on an as needed basis. The .msi installer also uses the Windows registry for settings, which is why you can make changes to the php.ini that don't have an effect.

 

After you install the .zip package like wildteen88 stated above, you won't have these problems.

Link to comment
Share on other sites

The .dll's *are* in the folder - that's why this is such an annoying problem. They're right there with all the 42 other dll's that php has no problem loading.

 

I reinstalled PHP from the zip, and sadly it's made no difference other than adding one more dll that won't load to the list: php_sybase_ct.dll

 

Go figure..

Link to comment
Share on other sites

Okay, I did a lot of things and finally the errors are gone. To wit:

 

  • Uninstalled Apache and PHP and did clean re-installs
  • Commented out all the extensions that I didn't need
  • Ran a registry clean
  • Installed Dependency Walker and ran PHP through it to identify problems - there were a few missing and/or corrupt DLLs

 

Having run through that lot, mysqli is now working - that being the one I really wanted sorted - and there are no further errors. I wish I could tell you exactly which step it was that fixed that one, but I'm afraid I lost track  :)

 

Thanks for the help, all!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.