Troubleshooting
SQLSTATE 2026 error when installing or updating PrestaShop
The Doctrine warning about server_version is a wrapper. In this trace, the most specific detail is SQLSTATE[HY000] [2026]: the SSL connection to MySQL fails before Doctrine can query the server version.
[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.
Do not change 1013 to 1016 in app/config/doctrine.yml: the official configuration uses 1013 for PDO::MYSQL_ATTR_MULTI_STATEMENTS, and that option does not fix the certificate paths that SSL_CTX_set_default_verify_paths failed points to.
Checks
- Confirm that the web installation and the process running the update use the same PHP version and the same
pdo_mysqlextension. - Keep the full exception and check the PHP log for the same minute. Look for errors about OpenSSL, CA certificates or a certificate path that does not exist.
- If you manage the server, check the MySQL client's SSL configuration and the CA paths of the PHP that runs PrestaShop. Do not disable TLS verification to get the update working.
- On shared hosting, open a ticket with the domain, the approximate time, the PrestaShop and PHP versions and the full exception. Do not include passwords.
Setting server_version can avoid Doctrine's auto-detection when the connection already works, but it does not repair a connection that fails with SQLSTATE 2026. Switching between PDO implementations should only be tried if support confirms that it matches the PHP selector and the error observed on that server.
Before retrying an update, create a verified backup and follow the official PrestaShop update documentation.
Before running the installer again
Check whether the previous attempt got as far as modifying tables or files. A failed connection may be the first error, but an update interrupted at another stage could leave partial changes. Keep the log and go back to the intended consistent point before repeating an operation that writes data.
The terminal PHP and the domain PHP can use different configuration files and CA stores. Say which one ran the process; changing only the web selector does not prove that a console command uses the new configuration.
You may also find useful
- Joomla 1.5 and 2.5, compatibility with MySQL 8 Deal with unsupported Joomla's incompatibility with MySQL 8 through isolation, inventory and gradual...
- Old Drupal, conflict with the system table in MySQL 8 Withdraws the unsafe renaming of the system table and points the recovery of Drupal 6 or 7 towards a...
- 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.