No solution here works for my “Class 'PDO' not found.”

徘徊边缘 提交于 2019-12-02 11:53:26

Contact your Hosting support and let them enable PDO for you.

In some hosting you can overwrite php.ini by creating php.ini file in your hosting root. These are the extensions you need to enable in php.ini if you are in windows hosting.

extension=php_pdo.dll
extension=php_pdo_mysql.dll

Edit:

Check if PDO is already installed by your hosting provider. Create index.php file or any other file which you can access. The content must have

<?php
    phpinfo();
?>

If PDO is installed already, the next thing to do is running composer install (SSH access required). You must delete your vendor folder beforehand. Assuming that your public folder is /var/www/html. go to the html directory and run

composer install

It's late but i here is my solution. i was facing the same problem in Laravel 5.6 and i didn't have SSH access for some reason. but when i change my PHP version from 7.2 to 7.1 it works for me.

Hope this will work with someone who doesn't have shell access.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!