1

I serve my Laravel app on the local network with the following artisan command "sudo php artisan serve --host 192.168.1.102 --port 8080".

The app is accessible from the local network, however, when the app tries to handle a DB query it throws the following exception:

could not find the driver (SQL: select * from tests)".

When I serve my app on localhost with a plain "php artisan serve" command DB queries work just fine, though.

What could cause the issue and how do I solve it? Thanks!

Alan
  • 386
  • 1
  • 3
  • 17
Gleb Kisenkov
  • 37
  • 1
  • 7
  • The following steps helped me solve the problem: 1) sudo apt install php-mysql 2) locate php.ini file with "php --ini" command 3) find and uncomment the following line ";extension=php_pdo_mysql.dll" 4) restart the server I'm still confused as to why everything went fine when serving my app locally, though. – Gleb Kisenkov Sep 17 '19 at 19:02

0 Answers0