Frage

I'm developing a project that uses CURL PHP, but I'm not being able to install the curl extension since I've not the root user of the "Nitrous.io" box.

There is another alternative to install CURL PHP in a Nitrous.io PHP Box?

Thanks in advance!

War es hilfreich?

Lösung

Just re-install php5 package on nitrous.io box

$ parts update
$ parts install php5
$ php -m | grep curl
curl 
$ php -r 'echo curl_version()["version"] . PHP_EOL;'
7.22.0

Andere Tipps

I'm not familiar with Nitrious.io, but if you are unable to access/install curl for your project, you will have to contact Nitrious directly about using curl.

Also, you might be able to use fsocketopen to solve your issue. Example:

$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
    echo "$errstr ($errno)
\n";
} else {
    $out = "GET / HTTP/1.1\r\n";
    $out .= "Host: www.example.com\r\n";
    $out .= "Connection: Close\r\n\r\n";
    fwrite($fp, $out);
    while (!feof($fp)) {
        echo fgets($fp, 128);
    }
    fclose($fp);
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top