Search code examples
laravellaravel-5pdo

Laravel 5.5 "Class 'PDO' not found"


Here is the actual error when I open the site

enter image description here

Actually, I have successfully run php artisan migrate:refresh, and there is no error.

Already tried the following command.

php artisan cache:clear
php artisan config:clear

composer install
composer clearcache
composer dump-autoload
php artisan clear-compiled

I also checked if pdo is installed, thru php -m and its already installed

enter image description here

I'm using CentOS.


Solution

  • What is most likely happening here is that the PDO module is enabled in the php-cli config (hence it works from command line), but is not enabled on the web server configuration file.