Laravel 5.1:安装新的错误

时间:2015-06-19 19:04:51

标签: php xampp laravel-5 composer-php

当我运行laravel new blog或任何名称时,我收到以下错误:

Crafting application...
PHP Fatal error:  Uncaught TypeException: Argument 2 passed to GuzzleHttp\Adapter\StreamAdapter::createResponseObject() must be of the type array, null given, called in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 67 and defined in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php:71
Stack trace:
#0 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(67): GuzzleHttp\Adapter\StreamAdapter->createResponseObject(Object(GuzzleHttp\Message\Request), NULL, Object(GuzzleHttp\Adapter\Transaction), Object(GuzzleHttp\Stream\Stream))
#1 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(52): GuzzleHttp\Adapter\StreamAdapter->createResponse(Object(GuzzleHttp\Adapter\Transaction))
#2 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Client.php(193): GuzzleHttp\Adapter\StreamAdapter->send(Object(GuzzleHttp\Adapter\Transaction)) #3 C:\U in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 71

Fatal error: Uncaught TypeException: Argument 2 passed to GuzzleHttp\Adapter\StreamAdapter::createResponseObject() must be of the type array, null given, called in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 67 and defined in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php:71
Stack trace:
#0 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(67): GuzzleHttp\Adapter\StreamAdapter->createResponseObject(Object(GuzzleHttp\Message\Request), NULL, Object(GuzzleHttp\Adapter\Transaction), Object(GuzzleHttp\Stream\Stream))
#1 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(52): GuzzleHttp\Adapter\StreamAdapter->createResponse(Object(GuzzleHttp\Adapter\Transaction))
#2 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Client.php(193): GuzzleHttp\Adapter\StreamAdapter->send(Object(GuzzleHttp\Adapter\Transaction)) #3 C:\U in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 71

我不明白这是怎么发生的。 Here is my PhpInfo file

由于

1 个答案:

答案 0 :(得分:2)

答案很简单。我从PHP7运行PHP CLI而不是XAMPP / PHP5。只需取消注释extension=php_curl.dll行。