2

I keep getting this error when I try to run cUrl:

Call to undefined function curl_init()

So I try to install it with these lines:

extension_dir = "C:\PHP7\ext"
extension=curl

But it never shows up in my phpinfo();

Here is from the Apache error log:

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

And I've also tried the absolute path to curl (extension=C:\PHP7\ext\php_curl.dll)

The Hawk
  • 1,496
  • 6
  • 26
  • 43

2 Answers2

2

If:

  • Your settings look correct.
  • You're trying to load the right DLL for your PHP installation and not e.g. some random one you found in Google).
  • Curl works just fine from command-line PHP.
  • But you get this when running PHP as Apache module:

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

Then there's a chance that it gets fixed if you upgrade Apache to the latest build. (I've had that same problem myself.)

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
2

That was my problem too. I decided to upgrade my apache to Apache version 2.4.41

Link to binary if you install manually: https://www.apachelounge.com/download/

My php version is 7.3.9

good luck

Fabio Sodre
  • 339
  • 3
  • 11