CURL: Unable to load dynamic library
Posted by: xavier1980 (---.static.chello.nl)
Date: May 10, 2018 09:21PM

I've recently installed the PHP 7.1.17 add-on to my existing WAMP installation. However after selecting PHP 7.1.17 as the running version cUrl no longer seems to work. However cUrl still works when I select previous any of the versions (7.0.0 or 5.6.16).

The PHP error log says:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/wamp64/bin/php/php7.1.17/ext/php_curl.dll' - Kan opgegeven procedure niet vinden. in Unknown on line 0

The php_curl.dll file exists in the 'C:/wamp64/bin/php/php7.1.17/ext/' path. In the PHP.INI file and the phpForApache.ino file the "extension=php_com_dotnet.dll" line is uncommended (no semicolon). However when I create a php file and view phpinfo() cUrl does not show.

Please advice.

I'am running Windows 10 (x64) with WAMP 3.1.3 (x64) with Apache 2.4.17. The WAMP icon is GREEN.

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Otomatic (Moderator)
Date: May 11, 2018 09:44AM

Hi,

Use at least Apache 2.4.23.
But, for recent PHP versions, it is best to always use the latest version of Apache : 2.4.33

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: RiggsFolly (Moderator)
Date: May 11, 2018 10:10AM

As far as I am aware the `php_com_dotnet` extension has nothing to do with the `php_curl` extension so why did you mention that?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: xavier1980 (---.ip.prioritytelecom.net)
Date: May 11, 2018 03:15PM

@RiggsFolly, you are right. I copied and pasted the wrong line. I ment "extension=php_curl.dll". (Double checked it just now).

@Otomatic, I installed the Apache : 2.4.33 update for WAMP and rebooted my PC. Unfortunately still the same problem with cURL.

Any other suggestions I could do or check?

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Otomatic (Moderator)
Date: May 11, 2018 03:28PM

Hi,

> I installed the Apache : 2.4.33 update for WAMP
You need to switch to Apache 2.4.33 in place of Apache 2.4.17.

Left-Click Wampmanager tray icon -> Apache -> Version -> 2.4.33 (Click on 2.4.33)

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: xavier1980 (---.ip.prioritytelecom.net)
Date: May 11, 2018 04:13PM

@Otomatic, yes I did also switch the Apache version in WAMP. But with both Apache versions I still get the Curl error. Strangely when I switch back to PHP version 7.0.0 cUrl works fine. But on PHP version 7.1.17 it doenst work sad smiley

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Otomatic (Moderator)
Date: May 11, 2018 04:28PM

Hi,

- Verify that all VC ++ packages are installed and with the latest versions.
To do this, use the tool:
Checks VC++ packages installed
And you will find all the packages on [wampserver.aviatechno.net] in section Visual C++ Redistribuable Packages
Do not forget that if you have a 64 bit Windows, you must install both 32 and 64 bit versions of each package.
You must install each package "as an administrator", so right-click the exe file and then run as Administrator.
Do not use a previously loaded tool. Make a new download to make sure you are using the correct version.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: thumbs (199.34.72.---)
Date: September 27, 2019 02:51AM

I didn't want to open a new thread since this seems to be the exact same problem I'm having, but I'm not sure how to resolve it after many hours of trying everything I could dig up here and on SO.

I'm on Windows 10, upgraded my 2.5 installation using wampserver2.5_x64_update_3.0.3.exe, then wampserver3_x86_x64_update3.1.9.exe to get to 3.1.9.

Curl works fine with PHP 7.03 (and below); but I need a higher version for a project, and it fails with 7.1.32, 7.2.23 and 7.3.10. Same problem as the OP, error log says:

PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:/wamp/bin/php/php7.3.10/ext/curl (The specified module could not be found.), C:/wamp/bin/php/php7.3.10/ext/php_curl.dll (The specified module could not be found.)) in Unknown on line 0

I'm using Apache version 2.4.9, and yes all the VC packages were installed/verified before the updates. Is there any chance this is related to the update instead of clean installation? I have no idea if this was resolved for the poster.

Any thoughts much appreciated!

Thanks.

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: nikolas (---.forthnet.gr)
Date: November 20, 2019 01:06PM

I m facing the same issue, any help would be much appreciated.

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Otomatic (Moderator)
Date: November 20, 2019 01:49PM

Hi,

Apache 2.4.9 seems to be not compatible with PHP 7.3

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: nikolas (---.forthnet.gr)
Date: November 20, 2019 03:16PM

I upgraded to apache 2.4.41 from 2.4.35 and seems to have fixed the issue

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Dima (---.ip.moscow.rt.ru)
Date: November 26, 2020 04:35PM

I can confirm: I was getting same curl extension error on php7.2.34 and php7.4.13, while on php7.0.8 it worked fine.
Updated my apache2.4.20 to 2.4.46. It was a bit hard since I couldnt find a ready-made apache; had to install newer wamp to a different folder, but it overrode my apache and mysql services, had to revert it back. Also had to change
Define VERSION_APACHE 2.4.46
Define INSTALL_DIR "C:/wamp64/"
since my older wamp3.0.0 probably had no idea about that.

And now with apache2.4.46 newer versions of php work fine, no php_curl.dll error on exactly same php7.2.34 folder.
Just update your apache.

Options: ReplyQuote
Re: CURL: Unable to load dynamic library
Posted by: Otomatic (Moderator)
Date: November 26, 2020 04:57PM

Hi,

> Updated my apache2.4.20 to 2.4.46. It was a bit hard since I couldnt find a ready-made apache;

For Wampserver, there are ALWAYS two places to look:
- WAMPserver 3 - All you need to know
- https://wampserver.aviatechno.net/

There was no need to install another version in another place, just keep up to date! There is a cumulative update for Wampserver, 3.2.4 today. Your version 3.0.0 was old enough to go to school, in the Preparatory Course.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.