2017-04-05 91 views
-4

我已經安裝了Laravel,現在我想創建一個命令項目(laravel新的文件夾名),但我得到的錯誤是這樣的:創建laravel項目

[GuzzleHttp\Exception\RequestException] 

    No system CA bundle could be found in any of the the common system locations. 
    PHP versions earlier than 5.6 are not properly configured to use the system's 
    CA bundle by default. In order to verify peer certificates, you will need to 
    supply the path on disk to a certificate bundle to the 'verify' request 
    option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not 
    need a specific certificate bundle, then Mozilla provides a commonly used CA 
    bundle which can be downloaded here (provided by the maintainer of cURL): 
    https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once 
    you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP 
    ini setting to point to the path to the file, allowing you to omit the 'verify' 
    request option. 

我需要幫助,請...

+0

你安裝了什麼版本的PHP? – Mick

+0

PHP版本5.4.12 –

回答

-1

我認爲這是一個Guzzle問題,而不是一個純粹的問題。無論如何嘗試這一點。

1-下載此文件https://curl.haxx.se/ca/cacert.pem並將其保存在您的計算機中的某個位置。例如c:/xampp/cacert.pem

2 - 打開你的php.ini配置文件

3-查找以下的配置,如果它存在取消註釋或添加它,如果它不:

[curl] 
curl.cainfo=c:/xampp/cacert.pem 
+0

我使用Windows 10和Wamp服務器 –

+0

無論您使用什麼樣的功放軟件,它都是關於php本身。我正在使用win10和xampp,並使用安裝程序設置一個新的laravel項目 - 就像你做的那樣 - 在php 5.6 –

-1

Laravel是有據可查的,我會建議你去通過文檔首先安裝過程。有幾個基本的要求需要滿足:

  • PHP> = 5.6.4
  • OpenSSL的PHP​​擴展
  • PDO PHP擴展
  • MBSTRING PHP擴展
  • 分詞PHP擴展
  • XML PHP Extension

https://laravel.com/docs/5.4

你的問題被否決,因爲你沒有清楚地解釋你的問題。根據我的理解,您希望通過命令創建項目,如作曲者create-project {項目名稱}

與laravel通過命令創建項目無關。作曲家正在爲我們做所有這些事情。首先安裝composer,然後嘗試使用composer create-project命令創建項目。

+0

https://laravel.com/docs/5.4/installation上沒有問題,您可以使用Laravel創建一個項目安裝者:laravel新博客。他只需要升級他的PHP版本。 – Mick

+0

@ mick是的,你是對的。我們可以用laravel命令行創建項目。但是我在回答中提到這個問題並不是很清楚,這就是爲什麼我建議他使用作曲家,而且我也提到了Laravel的基本要求。不幸的是,我輸入了答案,並在發佈我的答案後看到了您的回覆。 – Muhammad