PHP Warning: PHP Startup: Unable to load dynamic library php_curl.dll impossibile find

lbottoni picture lbottoni · Sep 22, 2015 · Viewed 14.7k times · Source

I have Windows 10 with WAMP server (Apache 2.4.9, PHP 5.5.29 VC11 x64, e MySQL). All works fine, but now I will use curl extension.

I go into C:\wamp\bin\php\php5.5.29\phpForApache.ini (from webserver configuration) and remove the comment from extension=php_curl.dll

reload apache server and in error_log I have

[22-Sep-2015 13:13:30 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.29/ext/php_curl.dll' - Impossibile trovare il modulo specificato.in Unknown on line 0

The DLL is on the correct folder and the other DLLs work fine.

1° try: I added in system var PATH: C:/wamp/bin/php/php5.5.29/ext/;c:/wamp/bin/php/php5.5.29/

2° try: I have re-dowload the file php-5.5.29-Win32-VC11-x64.zip and replaced the php_curl.dll

But I have always the same result: index.php

Fatal error: Call to undefined function curl_exec()

phperror_log:

[22-Sep-2015 13:13:30 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.29/ext/php_curl.dll' - Impossibile trovare il modulo specificato.in Unknown on line 0

Answer

armyofda12mnkeys picture armyofda12mnkeys · Nov 4, 2016

These steps worked for me:

  1. Add the main php folder onto the Path Env variable in Windows (so libeay32.dll and ssleay32.dll are path-accessible ... some people copy these to Windows/System32 to make them path-accessible but that isn't really elegant way to solve issue)
  2. Add the Apache bin folder onto the Path Env variable in Windows

  3. Copy the file libssh2.dll from the php folder to apache's bin folder (Apache seems to need this for php's curl to work in Windows)