Shekh Saifuddin
Shekh Saifuddin

Reputation: 518

Illuminate\Database\QueryException : could not find driver

My Laravel Project is working fine on localhost, but when I hosting this on cpanel and try to login or register. it's through me this error like could not find driver (SQL: select * fromuserswhereemail= [email protected] limit 1). What Should I do..??

Upvotes: 5

Views: 17617

Answers (2)

Mnikoei
Mnikoei

Reputation: 191

You probably didn't enable PDO extension. In your cpanel select

SOFTWARE > Select PHP Version

You see all extensions there, enable these extensions :

  • pdo
  • mysqlnd
  • ndmysqli
  • nd_pdo_mysql

Upvotes: 18

Shekh Saifuddin
Shekh Saifuddin

Reputation: 518

First of all, I want to thank all of you guys, I find another solution to solve this kind problem, What I have done just in my .htaccess file this line of code

# php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php71” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php71 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit and change

DB_USERNAME=something DB_PASSWORD=something

and my problem is solved, this is enabled mysql also, Thank you guys Happy Coding....

Upvotes: 0

Related Questions