PHP error: cURL does not load on latest PHP versions
Posted by: chrishoefliger (---.dclient.hispeed.ch)
Date: November 11, 2023 04:16PM

As long as I am using a version up to PHP 8.1.24, cURL works. As soon as I am trying either 8.1.25 or 8.2.12 no cURL is loaded. I am getting the following in my PHP error log:

PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: w:/wamp64/bin/php/php8.2.12/ext/curl (Das angegebene Modul wurde nicht gefunden), w:/wamp64/bin/php/php8.2.12/ext/php_curl.dll (Die angegebene Prozedur wurde nicht gefunden)) in Unknown on line 0

The path to /ext is correct, other modules load ok, and php_curl.dll is in the folder.

This is wampserver 64 on Win 11 22H2. The error occured only after I installed PHP 8.1.25/8.2.12. Any suggestions?

Options: ReplyQuote
Re: PHP error: cURL does not load on latest PHP versions
Posted by: Otomatic (Moderator)
Date: November 12, 2023 05:48PM

Which version of Wampserver?

The curl extension is perfectly loaded with PHP 8.2.12 or PHP 8.1.25.

Are you up to date with VC++ redistributables?

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

Options: ReplyQuote
Re: PHP error: cURL does not load on latest PHP versions
Posted by: chrishoefliger (---.dclient.hispeed.ch)
Date: November 15, 2023 09:17AM

Thanks for getting back to me. I deinstalled the two versions in question and then went on to reinstall the VC++ executables from the MS site. Then I reinstalled PHP 8.1.25 as well as 8.2.12.
The error message is still the same, and the cURL module is neither found nor loaded.

I was the bold and changed the extension dir path in line 776 of phpForApatche.ini to point to php 8.1.24.
And lo: cURL is found and loaded. The same happens, when I copy the curl.dll from 8.1.24 over to 8.1.25.


What now?



Edited 1 time(s). Last edit at 11/15/2023 09:40AM by chrishoefliger.

Options: ReplyQuote
Re: PHP error: cURL does not load on latest PHP versions
Posted by: Otomatic (Moderator)
Date: November 15, 2023 09:42AM

Hi,

Right-Click -> Tools -> Check symbolic links

> I was the bold and changed the extension dir path in line 776 of phpForApatche.ini to point to php 8.1.24.
This is absolutely not the solution!
You're loading a library that doesn't correspond to the PHP version you're using.

What is your Apache version ?

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



Edited 1 time(s). Last edit at 11/15/2023 11:03AM by Otomatic.

Options: ReplyQuote
Re: PHP error: cURL does not load on latest PHP versions
Posted by: chrishoefliger (---.dclient.hispeed.ch)
Date: November 15, 2023 01:29PM

I absolutely agree that this cannot be the solution.
Checking symbolic links did not reveal anything unusual.

My Apache was 2.4.54.1 and it wasn't clear to me that this was the problem. I've installed 2.4.58 and that works now.
Thanks for your patience.

Options: ReplyQuote
Re: PHP error: cURL does not load on latest PHP versions
Posted by: Otomatic (Moderator)
Date: November 15, 2023 04:26PM

Hi,

> My Apache was 2.4.54.1 and it wasn't clear to me that this was the problem.

It's impossible to find anywhere a table listing the compatibility between Apache versions and PHP versions used as Apache modules.

What tipped me off is that I always use the latest Apache version to check that the latest PHP versions are working properly.

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.