Call to undefined function curl_init

As the title says, probably curl extension for php is not installed/enabled and you got the following error:

Fatal error: Call to undefined function curl_init() in

If you are 100% sure that curl is not installed, jump to the 'install php5-curl' instructions.

Check if php5-curl is installed

Check if file exists in /usr/lib/php5/20090626+lfs

Note: The last folder '20090626+lfs' may not exist with the same name on your computer

If it's there, then probably curl is installed but not enabled. Open curl.ini which can be located under /etc/php5/conf.d and uncomment the 'extension' directive. It should look like this.

; configuration for php CURL module

Save the file and restart apache with one of the following commands:

#service apache2 restart


#/etc/init.d/apache2 restart

Install php5-curl

If curl is not installed, you can install it with the following command:

#apt-get install php5-curl

You will be asked for permission to install curl support for php and upon installation curl automatically will be enabled.

For the last, you will need to restart Apache to load the new configuration.

- Posted by Eva to Php