I'm using fopen() php method to open a connection to a resource to read it. This resource is a https url.
When I try to execute the script that uses fopen with php5-fpm (from browser), php throws this error:
2015/10/20 12:16:38 [error] 6765#0: *37 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(): SSL: Handshake timed out in ...
But when I call this same url from php client all works fine.
For example, I have this simple script:
$path = "https://www.example.com/";
$handle = fopen($path, 'r');
var_dump($handle);
If I call this script from php client response will be: "resource(5) of type (stream)", so all ok. In case of php5-fpm, response will be: false, and Handshake error is thrown.
If I execute this same script with php5-fpm without ssl works ok. And allow_url_fopen is On. And openSSL support is enabled.
Thanks for your help!