Fatal error: Call to undefined function curl_init()
On old versions of Debian and Ubuntu, you solved this by installing the Curl extension for PHP, and restarting the webserver. Assuming the webserver is Apache 2:
sudo apt-get install php5-curl
sudo service apache2 restart
On newer versions, the package name as changed:
sudo apt install php-curl
It's possible you'll need to install more:
sudo apt-get install curl libcurl3 libcurl3-dev;
curl is an extension that needs to be installed, it's got nothing to do with the PHP version.
http://www.php.net/manual/en/curl.setup.php
Don't have enough reputation to comment yet. Using Ubuntu and a simple:
sudo apt-get install php5-curl
sudo /etc/init.d/apache2 restart
Did NOT work for me.
For some reason curl.so
was installed in a location not picked up by default. I checked the extension_dir
in my php.ini and copied over the curl.so
to my extension_dir
cp /usr/lib/php5/20090626/curl.so /usr/local/lib/php/extensions/no-debug-non-zts-20090626
Hope this helps someone, adjust your path locations accordingly.