我破坏了Mac的PHP设置:SSL认证失败

时间:2015-02-23 07:08:21

标签: php ssl

长话短说,我删除了Mac上的PHP符号链接,并将其替换为XAMPP的符号链接。现在看来我的SSL配置存在问题,或者在我看来是什么,缺乏。

例如,当我运行composer self-update时,它会抛出此错误:

[Composer\Downloader\TransportException]                                                                                       
  The "https://getcomposer.org/version" file could not be downloaded: SSL operation 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

我从某个地方得到this debug script并说:

布尔(假) 字符串(69)“SSL证书问题:证书链中的自签名证书” 字符串(0)“”

看起来curl.cainfo未从php.ini中取消

Curlerror.txt说:

* About to connect() to extensions.bolt.cm port 443 (#0)
*   Trying 46.17.0.55...
* Adding handle: conn: 0x100976400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x100976400) send_pipe: 1, recv_pipe: 0
* Connected to extensions.bolt.cm (46.17.0.55) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /Applications/XAMPP/xamppfiles/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL certificate problem: self signed certificate in certificate chain
* Closing connection 0

所以关于如何解决这个问题的想法?我应该在php.ini(或某处)设置curl.cainfo并将其指向我的证书位置吗?该位置在哪里?

0 个答案:

没有答案