문제

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!

도움이 되었습니까?

해결책

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

다른 팁

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);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top