skip to Main Content

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:PHP7ext"
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:PHP7extphp_curl.dll)

2

Answers


  1. 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:…extcurl (The specified module could not be found.), C:…extphp_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.)

    Login or Signup to reply.
  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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search