0

我已经检查了很多 StackOverflow 帖子,但仍然找不到解决方案。我正在使用 Dropbox PHP API,但我认为这无关紧要。似乎问题在于cURL 拒绝使用 CAPATH 或 Dropbox 提供的特定证书来连接 API,而只是放弃了. 经过一系列调试测试,这是我从 CURLOPT_VERBOSE 得到的输出:

* Adding handle: conn: 0x252c110 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 2 (0x252c110) send_pipe: 1, recv_pipe: 0 * About to connect() to api.dropbox.com port 443 (#2) * Trying 108.160.167.19... * Connected to api.dropbox.com (108.160.167.19) port 443 (#2) * Initializing NSS with certpath: sql:/etc/pki/nssdb * Unable to initialize NSS database * Initializing NSS with certpath: none * Unable to initialize NSS * Closing connection 2

Dropbox API 代码集CURLOPT_CAINFOCURLOPT_CAPATH. 我检查了 PHP 是否可以访问该目录和该文件。我不明白为什么Initializing NSS with certpath: none当我明确提供一个时 cURL 会说...任何帮助将不胜感激。

4

1 回答 1

1

我在 Amazon ec2 实例(Amazon linux)上遇到了这个问题,重新启动 apache 解决了它。

使用 apachectl 重新启动没有帮助

所以这样做使用

/etc/init.d/httpd restart
于 2014-11-12T14:29:28.160 回答