ConFoo Montreal 2026: Call for Papers

Voting

: two plus four?
(Example: nine)

The Note You're Voting On

Goce Dokoski
6 years ago
Trying to fsockopen an ssl:// connection, but it was hanging for a long time, ignoring timeout parameter, and eventually returning false, without an error message.

Turns out (at least) on Windows it validates certificates and doesn't have a valid certificate store.

This worked for me:

- download Mozilla's certificate store from https://curl.haxx.se/ca/cacert.pem
- copy it inside php installation (for example: c:\php)
- and set it up in php.ini

openssl.cafile="c:\php\cacert.pem"

My system: Apache/2.4.29 (Win64) OpenSSL/1.0.2n PHP/5.6.38

<< Back to user notes page

To Top