How to Install cURL Module in PHP5 Ubuntu

I am a newbie to Ubuntu though, I was successful in installing Apache and MySQL(with PHPMyAdmin), now was enjoying my new OS but something wanted the cut off my joy with Ubuntu. I was writing some PHP codes that needs to work with cURL but unfortunately am getting this error message when I want to testrun:

Call to undefined function curl_init() in ….

 

I was confused to see that, I successfully made my way to Google, after some questions I came to understand that cURL module wasn’t installed together with PHP. So all did was installing it by doing this

sudo apt-get install php5-curl

When this is successfully installed, of course I need to restart Apache in order to be implemented

sudo service apache2 restart

Run your PHP cURL code and see it work 🙂