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

Publish date: 2024-05-17

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

8

7 Answers

These steps worked for me:

  • 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)
  • Add the Apache bin folder onto the Path Env variable in Windows

  • 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)

  • 7

    PHP Startup: Unable to load dynamic library 'curl' ... Uncommenting 2 lines in the php.ini file solves this

  • Open php.ini
  • Remove semicolon to uncomment ;extension_dir = "ext" If your php is in C under the folder "php" for example, your extension_dir = "ext" should be put as extension_dir = "C:\php\ext"
  • Remove semicolon to uncomment ;extension=curl
  • Save php.ini
  • 2

    What worked for me:

  • I copied libssh2.dll, libcrypto-1_1-x64.dll, libssl-1_1-x64.dll, ssleay32.dll, libeay32.dll to Apache bin folder. Probably not all of those are needed.

  • In php.ini, make sure the extension curl is loaded. This will be extension=php_curl.dll for php < 7 and extension=curl in php 7

  • Restart Apache Service

  • 1

    Make sure that in php.ini, extension_dir = points to the correct path if it's uncommented.

    Another possibility is an incompatibility between the version of apache and php, at least if you're using wampserver and/or missing VC++ executables. I was using php 7.4.11 and apache 2.4.27. Upgrading to apache 2.4.46d and installing missing executables solved the problem. That version of apaache also requires updating wampserver to 3.2.5. Make sure ALL the windows VC++ executable are installed. There is a small tool to check this. The updates and tools are found at https://wampserver.aviatechno.net/

    @see http://forum.wampserver.com/read.php?2,151396

    I performed the wampserver/apache update and installed some missing VC++ files all at once, so I can't be certain which thing actually fixed the problem loading curl.

    1

    Add to Apache httpd.conf:

    LoadFile "C:/Php56/libssh2.dll" LoadFile "C:/Php56/libeay32.dll" LoadFile "C:/Php56/ssleay32.dll" 

    i was facing the same error with wamp on windows the problem solved when i deleted another app using php (and making conflict) and reinstall wamp

    ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoamtvYW1%2BdH%2BOqZ%2BpZaeWv6%2B1zaBkqaCgYsC1rdGtrKllpaOuo7jEZquoZZykrqV5w7KlmqWZmHqttcGrmKuxXaW1sXnCrqmlZZShuW61zKmmrKuZl7at