【问题标题】:simplehtmldom - SSL operation failed with code 1. OpenSSL Error messagessimplehtmldom - SSL 操作失败,代码为 1。OpenSSL 错误消息
【发布时间】:2015-09-05 12:47:31
【问题描述】:

我在我的 web 应用程序中使用 http://simplehtmldom.sourceforge.net/file_get_contents()file_get_contents() 在本地主机上工作正常。但是当在服务器(Windows server 2012 r2)上上传 webApp 时,我得到了这个错误。如何解决此错误?

> Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75

Warning: file_get_contents(): Failed to enable crypto in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75

Warning: file_get_contents(https://www.markafoni.com/kadin/): failed to open stream: operation failed in E:\cfnic.com\includes\class\PHP_Simple_HTML_DOM_Parser.php on line 75

Fatal error: Call to a member function find() on boolean in E:\cfnic.com\includes\theme\category.php on line 159

【问题讨论】:

    标签: ssl file-get-contents simple-html-dom


    【解决方案1】:

    您基本上必须将环境变量 SSL_CERT_FILE 设置为从以下链接下载的 ssl 证书的 PEM 文件的路径:http://curl.haxx.se/ca/cacert.pem

    我花了很多时间才弄清楚这一点。

    详细答案可以看这里:https://stackoverflow.com/questions/34590842/cannot-install-composer-on-mac-os-x/34617315

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-02
      • 1970-01-01
      • 2022-01-11
      • 2016-09-07
      • 2020-05-12
      • 2020-05-09
      • 2018-07-06
      • 2022-06-12
      相关资源
      最近更新 更多