Call to Undefined Function Curl_Init().

Call to undefined function curl_init().?

If you're on Windows:

Go to your php.ini file and remove the ; mark from the beginning of the following line:

;extension=php_curl.dll

After you have saved the file you must restart your HTTP server software (e.g. Apache) before this can take effect.


For Ubuntu 13.0 and above, simply use the debundled package. In a terminal type the following to install it and do not forgot to restart server.

sudo apt-get install php-curl

Or if you're using the old PHP5

sudo apt-get install php5-curl

or

sudo apt-get install php5.6-curl

Then restart apache to activate the package with

sudo service apache2 restart

Fatal Error Call to undefined function curl_init()

I was able to finally solve this issue by finding a file in my PHP root folder called libssh2.dll and copy/paste into the Apache bin folder. Once I did that, curl is now enabled, and I no longer get the error in question. I'm getting other errors, but that's for another question.

Call to undefined function curl_init() even it is enabled in php7

I've had similar problem with curl after upgrade to XX (16.04).
After reinstalling curl with:

sudo apt-get install php-curl

And server restart

sudo service apache2 restart

everything went back to normal :)

Call to undefined function curl_init() after updating PHP version in WAMP

This is very dumb of me, but I finally solved it, leaving this answer here in case anyone struggles with the same problem.

I needed to update Apache from 2.4.33 to 2.4.47. Seems like the .33 version had problems with loading the cURL extension in PHP 7.4 for some reason.



Related Topics



Leave a reply



Submit