I have the following setup:
I've made minimal changes to both php.ini and httpd.conf
I tried enabling PHP's cURL extension by uncommenting extension=curl, and it was unable to load, showing no errors in Apache's log, but these couple of lines in PHP's errors log:
[28-Apr-2025 14:09:51 UTC] 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 module could not be found)) in Unknown on line 0
[28-Apr-2025 14:09:52 UTC] 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 module could not be found)) in Unknown on line 0
Things I made sure of:
C:\php\ext\php_curl.dll
is in fact correct and is accessible (other extensions are being loaded just fine)Things I've tried: I tried manually adding the DLLs files hoping this might solve the issue
LoadFile "C:/php/libssl-3-x64.dll"
LoadFile "C:/php/libcrypto-3-x64.dll"
LoadFile "C:/Apache24/bin/zlib1.dll"
I had a similar issue with SQLite3 and it was solved by including libsqlite.dll (Before I had Apache's bin directory added to PATH) And that completely solved that issue! So I tried the same but no luck
I read older answers to this issue and most of them suggest upgrading Apache and/or PHP, but I've installed the latest versions and I don't think downgrading will solve the issue, nor am I interested in downgrading at this point.
And one very important note, cURL is indeed loaded in PHP's cli and I was able to use it whiteout any issue, it's just not working when loaded with Apache.
It turned out to be a mistake on my end, even though I've added PHP and Apache to PATH, I added them to the user's PATH variable, which will not be recognized when running Apache as a service.
So I ended up adding them to the System's PATH variable and everything worked just fine.