simplehtmldom-SSL操作失败,代码为1.OpenSSL错误消息 [英] simplehtmldom - SSL operation failed with code 1. OpenSSL Error messages

查看:148
本文介绍了simplehtmldom-SSL操作失败,代码为1.OpenSSL错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的webApp中使用了http://simplehtmldom.sourceforge.net/file_get_contents(). file_get_contents()在localhost上可以正常工作.但是,当在服务器(Windows Server 2012 R2)上上传webApp时,出现此错误.如何解决此错误?

I'm using http://simplehtmldom.sourceforge.net/ and file_get_contents() in my webApp. The file_get_contents() work fine on localhost. But when upload webApp on server(Windows server 2012 r2) i get this error. How to fix this error?

> 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_CERT_FILE设置为从以下链接下载的ssl-certificate的PEM文件的路径: ://curl.haxx.se/ca/cacert.pem"rel =" nofollow noreferrer> http://curl.haxx.se/ca/cacert.pem .

You basically have to set the environment variable SSL_CERT_FILE to the path of the PEM file of the ssl-certificate downloaded from the following link : http://curl.haxx.se/ca/cacert.pem.

我花了很多时间来解决这个问题.

It took me a lot of time to figure this out.

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

For a detailed answer, you can have a look here: https://stackoverflow.com/questions/34590842/cannot-install-composer-on-mac-os-x/34617315

这篇关于simplehtmldom-SSL操作失败,代码为1.OpenSSL错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆