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
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 :)
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() 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
Are PHP Include Paths Relative to the File or the Calling Code
File_Get_Contents() Breaks Up Utf-8 Characters
How to Check Uploaded File Type in PHP
PHP: Producing Relative Date/Time from Timestamps
Why Is Facebook PHP Sdk Getuser Always Returning 0
Insert/Update Helper Function Using Pdo
What Is Thread Safe or Non-Thread Safe in PHP
What's the Use of Ob_Start() in PHP
How to Post Json to PHP With Curl
How to Create an Array from a CSV File Using PHP and the Fgetcsv Function
Checking If Form Has Been Submitted - PHP
Woocommerce Action Hooks and Overriding Templates
Keeping Session Alive With Curl and PHP