Hi All I have problem with Magento 2.3.5 with php 7.3.x.x
- Installation process go without any issue,
- db connection without SSL structure is created
But when I try to login in to admin or create account I got error
after investigation I founded that Magento cannot connect o MySQL because of error
PHP Fatal error: Uncaught Error: Undefined class constant 'PDO::MYSQL_ATTR_SSL_KEY' in /home/site/wwwroot/setup/src/Magento/Setup/Model/ConfigOptionsList.php:179 Stack trace: #0 /home/site/wwwroot/setup/src/Magento/Setup/Model/ConfigModel.php(71): Magento\Setup\Model\ConfigOptionsList->getOptions() #1 /home/site/wwwroot/setup/src/Magento/Setup/Console/Command/ConfigSetCommand.php(64): Magento\Setup\Model\ConfigModel->getAvailableOptions() #2 /home/site/wwwroot/vendor/symfony/console/Command/Command.php(77): Magento\Setup\Console\Command\ConfigSetCommand->configure() #3 /home/site/wwwroot/setup/src/Magento/Setup/Console/Command/ConfigSetCommand.php(54): Symfony\Component\Console\Command\Command->__construct() #4 /home/site/wwwroot/vendor/laminas/laminas-di/src/Di.php(511): Magento\Setup\Console\Command\ConfigSetCommand->__construct(Object(Magento\Setup\Model\ConfigModel), Object(Magento\Framework\Module\ModuleList), Object(Magento\Framework\App\DeploymentConfig)) #5 /home/site/wwwroot/vendor/laminas/laminas-di/src/Di.php(318): in /home/site/wwwroot/setup/src/Magento/Setup/Model/ConfigOptionsList.php on line 179
So I tried adding SSL options to env.php, but error stay somebody can help me with this ?
Driver Options that I used
array(
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => 'false',
PDO::MYSQL_ATTR_SSL_CA => '/var/SSL/BaltimoreCyberTrustRoot.crt.pem',)
@dzwoneksanc288 Could make sure that you have installed the php-pdo and php-mysql packages?
Maybe you have different PHP versions installed. Check first which PHP version you are using
php --version
then install the packages for your PHP version. For example
apt-get install php7.4-pdo php7.4-mysql
Hope it helps!
Thanks
Hi I got version
PHP 7.3.15 (cli) (built: Feb 24 2020 22:30:19) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.15, Copyright (c) 1998-2018 Zend Technologies /home>apt-get install php7.4-pdo php7.4-mysql
And this is PaaS so it have pre define and I cannot install 7.4, but Magento 2.3.5 is compatible with 7.3 if I'm correct
@dzwoneksanc288 The version is not an issue.
You have to check if pdo_mysql is installed and if not then just install it using the command which i gave earlier by replacing the php version with your php version.
Hope it helps!
Thanks