Curl extension not working - PHP Warning: PHP Startup: Unable to load dynamic library php_curl.dll

Solution 1:

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.

Solution 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.