|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-17 19:28 UTC] rnkhouse at gmail dot com
-PHP Version: 7.1Git-2017-07-17 (snap)
+PHP Version: 7.1.7
[2017-07-17 19:28 UTC] rnkhouse at gmail dot com
[2017-07-17 19:31 UTC] spam2 at rhsoft dot net
[2017-07-17 19:38 UTC] rnkhouse at gmail dot com
[2017-07-17 19:43 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2017-07-17 19:43 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Description: ------------ Mysql server is running php5.3. New webserver is running php7.1 (migrated from php5.3). When I try to connect Mysql server with ssl its not working. try { $dbh = new PDO($dsn, $user, $password, array(PDO::MYSQL_ATTR_SSL_KEY => '/etc/mysql/client-key.pem', PDO::MYSQL_ATTR_SSL_CERT => '/etc/mysql/client-cert.pem', PDO::MYSQL_ATTR_SSL_CA => '/etc/mysql/ca-cert.pem') ); echo "Connestion established"; } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } >Connection failed: SQLSTATE[HY000] [2002] >PDO::__construct(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed But, When I remove SSL block from connection, its working fine. I don't know what's going on. May be version mismatch of server and client. Becasue I am using old public key and private key. Is it because of mysql client and server version mismatch? PS: I have upgraded php7 in webserver only. Actual result: -------------- PDO::__construct(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed