Search code examples
phpubuntucurllamp

How can I enable cURL for an installed Ubuntu LAMP stack?


I have installed the Ubuntu LAMP stack. But cURL is not enabled, and neither can I can find the extension listed in the INI file. I added it manually, but it didn't work either.

How should I enable cURL then?


Solution

  • From Install Curl Extension for PHP in Ubuntu:

    sudo apt-get install php5-curl
    

    After installing libcurl, you should restart the web server with one of the following commands,

    sudo /etc/init.d/apache2 restart
    

    or

    sudo service apache2 restart