Search code examples
phpubuntucurlcloud9

cloud9, cannot install php cURL


I'm trying to execute my php script with a Curl request in cloud9. When I run, I have this Exception:

"Uncaught exception 'Exception' with message 'php function "curl_init" is missing' in /home/ubuntu/workspace/test.."

I tried to install curl with sudo apt-get install php-curl or sudo apt-get install php5.5-curl, also with "ppa:ondrej/php" repository.

Curl package seems to be installed successfully in the cloud9 virtual machine, but it hasn't been enabled in my php.ini.


Solution

  • Hope this works for you:

    sudo apt-get update
    

    Then:

    sudo apt-get install php5-curl