PHP 5.6 and certificate check issues

Since PHP 5.6, PHP systematically checks the remote certificate and reject connection if certificate is not valid.

You can avoid certificate check with context options

verify_peer, verify_peer_name and allow_self_signed

but you may also have problem with valid certificates, for instance to connect to Gmail SMTP :

You have to install root certificates on your server to solve the problem:


Leave a Reply

Your email address will not be published. Required fields are marked *