Skip to content
Advertisement

Laravel could not find driver Cpanel

I deployed my Laravel project on Cpanel but there’s an error “could not find driver(SQL)”

I’m using Mysql database in Cpanel, and I have checked pdo_mysql in PHP extension.

but when I looked on

phpinfo(); and find pdo_mysql, the result is 0/0

How to fix this?

Thanks in advance

Advertisement

Answer

Thanks for your reply. The culprit is my PHP version which is 7.3. then when I change it to 7.4 out of nowhere. It works like magic.

I change my .htaccess in Cpanel from

<FilesMatch ".(php4|php5|php7|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php73
</FilesMatch

to

<FilesMatch ".(php4|php5|php7|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php74
</FilesMatch>
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement