The cURL library is a useful tool that allows you to connect and communicate to many different types of servers with many different types of protocols. If you implement a cURL operation in your PHP code and the web page spits out a “Fatal error: Call to undefined function: curl_init()” error message back at you, then it is probably safe to assume that the cURL library is currently included in your Apache, PHP stack.

(To verify this, run a phpinfo() call and then search for ‘curl’. If it isn’t installed, then the search should return nothing).

To install cURL in Ubuntu 12.04 using a terminal, enter:

sudo apt-get install curl libcurl3-dev php5-curl
sudo service apache2 restart

If the status messages returned after the two operations have completed look all successful, rerun your phpinfo() call and you should now be able to find a couple of curl entries on the resulting page.