[Solved] PHP 7 / 7.1 PDO TLS

I am running into an issue creating a mysql connection over SSL/TLS. It worked fine in PHP 5.4. I’m thinking it has something to do with mcrypt.

I just checked and PHP 7.0 ehibits the same issue for my TLS mysql connection.


Edit: The issue was that I was using the remote server’s IP address rather than it’s domain name. The FQDN of the server and the common name of the certificate therefore didn’t match. In newer versions of PHP, PDO checks the CN and fails if it doesn’t match.