I am using Apache 2.2 server, PHP 5.3.6 on a Windows 7 OS running on a 64-bit system.
On starting Apache server, this error appears in the apache error log-
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\php5\ext\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0
Following are the other extensions mentioned in the php.ini file -
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_xsl.dll
extension=php_memcache.dll
Echoing phpinfo()
does not show the curl extension loaded, but the others are loaded.
The php_curl.dll
file is however present in the correct location along with the others -
D:\php5\ext\php_curl.dll
phpinfo()
shows that
extension_dir = D:\php5\ext
So, that also is correct.
Some more details
I am a new member in this team and I had setup Apache, PHP separately on this Windows 7 system and everything was working fine.
Our project needed a lots of httpd conf changes, so I was asked to simply overwrite the httpd conf file with the team's current version. I did the same and just changed the ServerName, ServerAdmin etc. I also copied their PHP installation directory.
Everything other than this extension is working fine.
The reason was most probably absence of some necessary dll files. Check my other question Apache start failing after apache config modifications, showing syntax error, cannot load php5apache2_2.dll into server which I put later, after getting some similar crazy errors. I have described the solution there.
With PHP 5.6.9 on Windows Server Core 2012 x64 cURL was not working, not showing up in phpinfo despite uncommenting php_curl.dll extension in my php.ini and restarting the Apache 2.4 service. Added the php path and the php\ext path to my $evn:path. No joy.
Fix: I didn’t need to download any other php_curl.dll file and couldn’t find one for PHP 5.6 anyway. What finally worked was to copy these three files into the Apache24\bin folder then restart Apache:
Copying these to System or System32 was not needed.
Make sure that the file is not corrupted and that is readable by the user that runs apache.
copy only libssh2.dll from php dir to apache/bin dir (for resolve problem with php_curl.dll)