PHP Fatal error: Class 'PDO' not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177 PHP信息:
PDO
PDO support => enabled PDO drivers => sqlite, sqlite2, mysql
pdo_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_sqlite
PDO Driver for SQLite 3.x => enabled SQLite Library => 3.7.7.1 PHP INI:
extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.so 码:
/** * Check whether the MySQL extension is installed/loaded * * @return boolean */ public function enabled() { return in_array('mysql', PDO::getAvailableDrivers()); } 关于为什么出现此错误的想法?
PHP 5.3.15 CloudLinux / CentOS 6 CPanel
尝试
yum install php-pdo yum install php-pdo_mysql
service httpd restart来源:stack overflow
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。