PDO driver names are apparently case sensitive. Use mysql
instead of MySQL
$DatabaseConfig = array('DB_TYPE' => 'mysql',
'DB_HOST' => 'localhost',
'DB_NAME' => 'simpleCMS',
'DB_USER' => 'root',
'DB_PASS' => 'mypass');
As additional cause for concern, this error message implies you have tried to call query()
on an object which is actually a PDOException
. Your try/catch
logic wherein you establish the PDO object warrants additional attention, though you have not posted it. Verify that the variable you're storing the PDO object in doesn't somewhere get reused by the exception handling...
Fatal error: Call to undefined method PDOException::query()