phpwindowsapachephp-curl

PHP cUrl extension broken with v8.2.12 update


This has been driving me crazy now for a while.

When I updated my Windows PHP install from v8.2.11 to v8.2.12 (back in October) the cUrl extension stopped working. Previous versions had been working fine up until then. And nothing else had changed system-wise (e.g. Apache, php.ini, environment variables etc.).

But, when I replaced the php_curl.dll with the one from the previous v8.2.11 install, it worked fine. Each subsequent install has had the same problem. So, I've just been carrying along the old v8.2.11 curl dll. I'm on v8.2.17 now.

Looking at phpinfo() when either version of php_curl.dll is used shows the exact same info. It says cURL support enabled for both. Even the newer version, which seems really odd given the startup error below. And the file size of the two versions is different: v8.2.17/675k and v8.2.11/599k. So seems like something is definitely different between them.

The following are the errors I've received.

PHP startup:

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

Just running some simple cUrl code, which I figured wasn't going to work anyway due to the above error:

PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in C:\******\curl.php:3

Any help would be greatly appreciated.


Solution

  • It seems there could be a conflict with Apache version prior to 2.4.58

    http://forum.wampserver.com/read.php?2,166267,166296

    http://github.com/leokhoa/laragon/discussions/615