oneandoneis2 Posted August 11, 2009 Share Posted August 11, 2009 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?? Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/ Share on other sites More sharing options...
wildteen88 Posted August 11, 2009 Share Posted August 11, 2009 Add the PHP folder C:\PHP to the PATH Environment Variable Some extensions require external libraries. These are located in C:\PHP (eg libmysql.dll). Adding PHP to the PATH will allow PHP to find these files. Also when enabling the php_pdo_* extensions make sure you enable php_pdo.dll too. Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896052 Share on other sites More sharing options...
oneandoneis2 Posted August 11, 2009 Author Share Posted August 11, 2009 Hi, Thanks, but sadly, C:\PHP is already in the PATH - I even added C:\PHP\ext just on the offchance that that would help as well, with no luck.. Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896064 Share on other sites More sharing options...
wildteen88 Posted August 12, 2009 Share Posted August 12, 2009 How did you originally install PHP? Did you install from zip or the installer? Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896068 Share on other sites More sharing options...
oneandoneis2 Posted August 12, 2009 Author Share Posted August 12, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896075 Share on other sites More sharing options...
wildteen88 Posted August 12, 2009 Share Posted August 12, 2009 Uninstall PHP and delete the PHP folder. Redownload the Zip package from http://windows.php.net and extract to C:\PHP Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896280 Share on other sites More sharing options...
PFMaBiSmAd Posted August 12, 2009 Share Posted August 12, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896443 Share on other sites More sharing options...
oneandoneis2 Posted August 12, 2009 Author Share Posted August 12, 2009 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.. Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896651 Share on other sites More sharing options...
PFMaBiSmAd Posted August 12, 2009 Share Posted August 12, 2009 Did you do this first - Uninstall PHP and delete the PHP folder. Uninstall as in add/remove (Vista Programs and Features.) Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896738 Share on other sites More sharing options...
oneandoneis2 Posted August 12, 2009 Author Share Posted August 12, 2009 It's XP, actually - I have the AMP stack on my Vista laptop and it works fine there.. But yes, I did it through the add/remove software. And rebooted. And put c:\php back in the PATH and rebooted again. Still no joy Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-896742 Share on other sites More sharing options...
oneandoneis2 Posted August 14, 2009 Author Share Posted August 14, 2009 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! Quote Link to comment https://forums.phpfreaks.com/topic/169842-php-fails-to-load-some-modules/#findComment-898486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.