2014-09-29 183 views
1

我在Windows中使用xampp,我的PHP版本是5.5.15。 需要安裝composer for開始使用laravel框架。但我的問題是在這裏,當我想安裝作曲家,面臨這個錯誤:作曲家「下載失敗」錯誤

Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
The download failed repeatedly, aborting. 

我該怎麼辦? 有沒有辦法在不使用composer的情況下安裝laravel?

+0

可能重複http://stackoverflow.com/questions/23900656/errors-in-installing -php-composer-on-windows) – Benz 2014-09-29 08:44:13

回答

0

因爲您尚未在您的計算機中安裝SSL證書。通過添加以下行它

wget http://curl.haxx.se/ca/cacert.pem 

然後,更新您的php.ini 文件

首先,你應該下載一個全球SSL證書

openssl.cafile=/anywhere-you-like/cacert.pem 

祝你好運!

+0

就像我知道'openssl.cafile' php.ini設置僅在PHP 5.6以後纔可用,所以我不會對PHP 5.5有任何影響(OP使用5.5) – Ventus 2016-05-27 10:33:46