class pdo not found laravel

2019-09-10 00:21发布

问题:

So here is the issue, My laravel 5.0 was working fine.. I basically have setup to domains, one like dev.mydomain.com and another 'mydomain.com'.I do all the testing in my dev site.. Just few moment ago, I created this dev domain. After then, the live site started giving me an error called Class PDO not found. FatalErrorException in ConnectionFactory.php line 179 but my dev site is working totally fine.. On searching out, I found such errors occurs when PDO extension is not enabled but my dev site under the same subdomain is working fine. I have also enabled PDO extension in my php.ini that the application is using currently.. How should i resolve this issue. someone please help

回答1:

strange I am answering myself.. If someone face this problem, make sure you set the php.ini to be recursive. Just add

suPHP_ConfigPath /home/<<username>>/public_html

in public_html/.htaccess

It worked for me :)