Troubleshooting
PrestaShop: "An exception occurred while establishing a connection to figure out your platform version"
If, when installing or updating PrestaShop, an error like this appears at the step that works with the database:
[WARNING] Some commands could not be registered. An exception occurred in ConnectionFactory.php while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value. For further information, visit: https://github.com/doctrine/DoctrineBundle/issues/673. In AbstractMySQLDriver.php, an exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed. The same error is repeated in Exception.php and PDOConnection.php: SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed.
the problem is neither MySQL nor the server's certificates: it is a number misinterpreted in PrestaShop's configuration. It will not happen if you install with the cPanel application auto-installer, but if it does appear, there are two solutions.
Why it happens
PrestaShop 1.7 and versions 8.0 and 8.1 enable the MySQL option MULTI_STATEMENTS by writing its number, 1013, in app/config/doctrine.yml. That number is correct with the mysqlnd-based PHP extension, but the classic pdo_mysql extension numbers its options differently: for it, MULTI_STATEMENTS is 1016 and 1013 is the SSL certificate path (SSL_CAPATH).
So PrestaShop ends up passing an invalid certificate path to the connection, the SSL connection fails and Doctrine cannot find out the MySQL version. Hence the SSL_CTX_set_default_verify_paths failed.
PrestaShop fixed this in 8.2, which uses the constant's name instead of the number. If you update from an earlier version, the error may appear during the update.
Solution 1: enable the nd_pdo_mysql extension (recommended)
Swap the pdo_mysql extension for nd_pdo_mysql from cPanel > Select PHP Version, in the extensions tab:
- Untick pdo_mysql.
- Tick nd_pdo_mysql.

Changes are saved automatically. nd_pdo_mysql does the same as pdo_mysql, but uses the numbering PrestaShop expects (1013), so you do not have to edit any file.
If your domain uses a different PHP version from the account's general one, make the change in that version. It is explained in multiple PHP versions per directory or domain.
Solution 2: edit app/config/doctrine.yml
Use it only if you cannot change the extension. Open app/config/doctrine.yml with the cPanel File Manager and find the options section:
options: # PDO::MYSQL_ATTR_INIT_COMMAND 1002: "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))" # PDO::MYSQL_ATTR_MULTI_STATEMENTS 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'
Change 1013 to 1016:
options: # PDO::MYSQL_ATTR_INIT_COMMAND 1002: "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))" # PDO::MYSQL_ATTR_MULTI_STATEMENTS 1016: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'
Keep the indentation with spaces: YAML does not allow tabs. Then clear the cache by deleting the contents of var/cache/ and repeat the installation or update.
1016 is only correct with pdo_mysql. If you enable nd_pdo_mysql later on, change it back to 1013.
Check that it works
Repeat the installation or update: the database step should complete without the platform version warning. If the update had been left half-finished, check its log first and, if necessary, restore the backup you made before starting.
You may also find useful
- Conflict with Drupal's "system" table in MySQL 8 (error 1064) Fix the Drupal 6 and 7 error 1064 with MySQL 8 caused by the system table, a reserved word: update D...
- Joomla 1.0 and 1.5 with MySQL 8, error with the reserved word "groups" Get a Joomla 1.0 or 1.5 site working with MySQL 8 by escaping the reserved word groups in the com_co...
- Corrupted tables in a MySQL database Confirm a table's error and engine before repairing it, keep a backup and avoid running REPAIR TABLE...
- Error "Argument X passed OrderProductForViewing must be of the type string" Identify the exact argument and row that deliver NULL when viewing a PrestaShop order, without bulk-...
Something wrong or out of date? Tell us and we will review it.