[SOLVED] error SSL3_GET_SERVER_CERTIFICATE
Posted: 17. February 2015 16:47
Hi,
When I try to execute a php script, which has to read a file from a https://path/to/my/repository, I get the following error:
and the pice of my code is:
I have already installed the package php5-curl and in my /opt/lampp/etc/php.ini I've pasted the line
Looking for this issue on google I found that a possible solution is to set CURLOPT_SSL_VERIFYPEER to false, but doing so I will allow possible external attacks.
This seems to be a common problem under Windows, but under Linux I didn't find any way out.
Any idea how to fix the problem?
Thanks
---
More info:
Apache Version Apache/2.4.10 (Unix) OpenSSL/1.0.1j PHP/5.6.3 mod_perl/2.0.8-dev Perl/v5.16.3
cURL support enabled
cURL Information 7.30.0
SSL Yes
TLS-SRP Yes
OpenSSL support enabled
SSL Version OpenSSL/1.0.1j
When I try to execute a php script, which has to read a file from a https://path/to/my/repository, I get the following error:
- Code: Select all
Warning: file(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
and the pice of my code is:
- Code: Select all
<?php
$lines = file("https://bitbucket.org/path/to/my/repository)
...
?>
I have already installed the package php5-curl and in my /opt/lampp/etc/php.ini I've pasted the line
- Code: Select all
extension=/usr/lib/php5/20121212/curl.so
Looking for this issue on google I found that a possible solution is to set CURLOPT_SSL_VERIFYPEER to false, but doing so I will allow possible external attacks.
This seems to be a common problem under Windows, but under Linux I didn't find any way out.
Any idea how to fix the problem?
Thanks
---
More info:
Apache Version Apache/2.4.10 (Unix) OpenSSL/1.0.1j PHP/5.6.3 mod_perl/2.0.8-dev Perl/v5.16.3
cURL support enabled
cURL Information 7.30.0
SSL Yes
TLS-SRP Yes
OpenSSL support enabled
SSL Version OpenSSL/1.0.1j