Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed #17

Open
newroseji opened this issue Feb 27, 2017 · 1 comment
Open

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed #17

newroseji opened this issue Feb 27, 2017 · 1 comment

Comments

@newroseji
Copy link

I got following Error when I tried with secured url:
ErrorException in Htmldom.php line 178: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

However, I fixed this issue with following extra arguments passed in load_file() method after
$args = func_get_args(); line
in Htmldom class.

$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$args[1]=false;
$args[2]=stream_context_create($arrContextOptions);

Just wondering if the author can push it built-in with much cleaner/optimized way instead of hard-coding like I did above.

@newroseji
Copy link
Author

@yangqi
I thought that the issue is fixed. But, again I got stuck with another similar issue.

ErrorException in Htmldom.php line 196: file_get_contents(): php_network_getaddresses: getaddrinfo failed: The requested name is valid, but no data of the requested type was found.

I tried the original method and above but in vain.

Help will be greatly appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant