1

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.

Uwe Keim
  • 2,420
  • 5
  • 30
  • 47
Sandeepan Nath
  • 647
  • 6
  • 13
  • 29
  • The addition of "C:\Program Files\PHP" to the global PATH environment variable did the trick for me (Apache 2.4 and PHP 5.6 on Windows). Had to reboot. Error before was that the curl module could not be loaded. Came to the solution with [this answer](http://serverfault.com/a/286389/54658). – Uwe Keim Dec 27 '14 at 15:17

4 Answers4

2

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.

Sandeepan Nath
  • 647
  • 6
  • 13
  • 29
2

PHP Warning: PHP Startup: Unable to load dynamic library ‘…\php-5.6.9\ext\php_curl.dll'

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:

libeay32.dll

libssh2.dll

ssleay32.dll

Copying these to System or System32 was not needed.

CodeUser
  • 21
  • 2
0

Make sure that the file is not corrupted and that is readable by the user that runs apache.

Mircea Vutcovici
  • 17,619
  • 4
  • 56
  • 83
-1

copy only libssh2.dll from php dir to apache/bin dir (for resolve problem with php_curl.dll)

  • 1
    All capital nicks look bad, I suggest to use simply to "Offside" or "offside". Furthermore, such magical-like "do X and then X will happen" solutions aren't very useful for the googlers of the future. – peterh Feb 16 '17 at 09:05