hope everyone doing well. I'm getting an error of SSL while creating new project using laravel. Here's my error:
[Composer\Downloader\TransportException]
The "http://packagist.org/p/laravel/laravel$745fa4e5f0a1485878f0b4c5be5cf26
a9e5d68243751f3c34acbd8bf3766065d.json" file could not be downloaded: SSL o
peration failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
For that problem, i'm trying multiple solutions but result still zero. I want to share one method which is used for SSL issue. I got that below method some website and where's the guy guide to add that below code in php.ini file.
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="/Applications/XAMPP/xamppfiles/etc/cacert.pem"
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile="/Applications/XAMPP/xamppfiles/etc/cacert.pem"
But this method also not working. Can anyone please help me to how can i resolve that issue. Thanks
Run that command and solve your problem, i fixed it myself
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
I'm on MacOs sierra also with PHP 5.6.24
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.