J3.x:Class 'PDO' not found

From Joomla! Documentation

Revision as of 06:35, 1 April 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎русский • ‎العربية

In Joomla 3.4 a new, based on the PDO, database driver for MySQL, was added (rapidly becoming the new de facto driver for MySQL database connections). However an incomplete check for the existence of the PDO driver was implemented for some users who didn't have the driver installed with PHP.

Errors reported

Fatal error: Class 'PDO' not found /libraries/joomla/database/[drive]/pdomysql.php on line 102

Versions affected

Info non-talk.png
General Information

This pertains only to Joomla! version(s):- 3.4.0

What is the cause

PHP doesn't ship in some cases with the PDO driver (it is present in the majority of instances) and there was a missing check for the existence of the PDO Driver.

How to fix

Apply the patch https://github.com/joomla/joomla-cms/pull/6175. This will be included in Joomla 3.4.1