Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
PHP Fatal error:  Class 'PDO' not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177



PDO support => enabled
PDO drivers => sqlite, sqlite2, mysql


PDO Driver for MySQL => enabled
Client API version => 5.5.24

Directive => Local Value => Master Value
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock


PDO Driver for SQLite 3.x => enabled
SQLite Library =>


Ideas as to why I'm getting this error?

PHP 5.3.15 CloudLinux/CentOS 6 CPanel

share|improve this question
Is your PHP the Apache module or CGI? And if it's CGI, do you have Apache installed? Do you have any other php.ini files anywhere on your system that could cause the difference? (A php.ini in your home directory will be picked up by CLI PHP.) – Ladadadada Aug 5 '12 at 17:22
fcgid. they all use the same PHP ini file. yes, using Apache. No php.ini in the home dir. – Tiffany Walker Aug 5 '12 at 18:49
@TiffanyWalker did you ever resolve this? We've run into the exact same issue and can't figure it out. Even weirder, it happened on only one of two servers that were just freshly provisioned with chef so they have theoretically been configured the same way. – apinstein Dec 4 '12 at 22:44
I did resolve it... I just can't remember what I did. I think I killed off all the php processes and apache and then it worked when they came back up? – Tiffany Walker Dec 4 '12 at 23:03

1 Answer 1

up vote 0 down vote accepted

It may be due to namespace problems in which case you need to escape PDO like:

$indexes = $this->dbh->cubrid_schema(\PDO::CUBRID_SCH_CONSTRAINT, $table->getName());

For more details see this answer

share|improve this answer
sounds about right. i think i ended up cpying files over because i ran chroot – Tiffany Walker Dec 31 '12 at 19:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.