我已经安装了 nginx、MySQL、HHVM 和 Composer,一切正常,所以我安装了 Laravel CLI 以laravel new blog
从终端运行,但是当我运行它时出现此错误:
eduardo@eduardo-desktop:~/www$ laravel new blog
Crafting application...
[GuzzleHttp\Exception\ConnectException]
cURL error 28: Operation timed out after 29996 milliseconds with 2800182 ou
t of 7820187 bytes received
[GuzzleHttp\Ring\Exception\ConnectException]
cURL error 28: Operation timed out after 29996 milliseconds with 2800182 ou
t of 7820187 bytes received
new <name>
有人可以帮助我吗?
提前谢谢你!:D
答案1
您需要default_socket_timeout
在 PHP 配置文件中增加(~/php.ini
),例如
default_socket_timeout = 300
或者使用卷曲在您的 PHP 代码中如:
curl_setopt($res, CURLOPT_TIMEOUT, 300);