PHP致命错误:使用laravel4找不到类'PDO'

Fel*_*lix 2 php pdo laravel-4

一小时后解决这个问题我失败了):我的错误信息是:

Generating autoload files
PHP Fatal error:  Class 'PDO' not found in /usr/share/nginx/html/laravel/app/config/database.php on line 16
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'PDO' not found","file":"\/usr\/share\/nginx\/html\/laravel\/app\/config\/database.php","line":16}}Script php artisan clear-compiled handling the post-update-cmd event returned with an error



  [RuntimeException]                                                                                                    
  Error Output: PHP Fatal error:  Class 'PDO' not found in /usr/share/nginx/html/laravel/app/config/database.php on li  
  ne 16                                                                                                                 




update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
Run Code Online (Sandbox Code Playgroud)

我使用linux centos 6.4 php 5.5.3和laravel 4.

你能帮我多少谢谢吗?

Dan*_* Li 9

你需要:

  1. 安装PDO支持.
  2. 在PHP配置中启用PDO.这可以通过添加以下内容来完成:

extension=pdo.so

extension=pdo_mysql.so

到你的php.ini文件.