Here is the actual error when I open the site
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
I'm using CentOS.
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.
I am adding all possible options which can solve the issue
Add use PDO; after your namespace or just before your class or at the top of your PHP file
As you are using centOS try the below commands
yum install php-pdo
yum install php-pdo_mysql
service httpd restart
If still its not solved check the php.ini file path to see which is being loaded in the phpinfo() output.
Sometimes there are two different PHP versions installed on a machine, one for CLI and one for the web server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With