I am trying to decrypt and update password into a mysql database table. while doing it is giving me a weird error.
PHP Warning: PDO::exec(): SSL operation failed with code 1. OpenSSL
Error messages: error:0906D06C:PEM routines:PEM_read_bio:no start line
in
.../vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php
on line 306 PHP Warning: PDO::exec(): MySQL server has gone away in
.../vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php
on line 306 PHP Warning: PDO::exec(): Error reading result set's
header in
../vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php
on line 306
passwords are encrypted using private key.
openssl_private_encrypt function is used for encryption.
decryption is done using openssl_public_decrypt
encryption along with insertion into databse works fine
decryption along with update does not work. PDO::exec fails for some
reason
Platform i am using is Ubuntu, PHP 5.6.24-1+deb.sury.org~xenial+1
Encrypt-Insert, Decrypt-Update is the order of operations.
Mysql connection is open before encryption and decryption is performed
code for encryption decryption:
Any insight on this problem would be much appreciated.
Thanks