0

When I navigate to my app on my server (Ubuntu) i get the following:

Data: { message: 'could not find driver (SQL: select * from "projects" order by "created_at" desc)', exception: 'Illuminate\\Database\\QueryException', file: '/root/project/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php', line: 664, trace: [ { file: '/root/project/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php', line: 624, function: 'runQueryCallback', class: 'Illuminate\\Database\\Connection', type: '->' }, 

However locally it works. So i thought perhaps the driver is not install, but when I run the following it shows the I have sqlite installed:

 sqlite3 -version 3.19.3 2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b 

My database config looks like this with the default being sqlite:

'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.db')), 'prefix' => '', ], 

Whats my next step to figure out why this wont work?

1 Answer 1

1

You have sqlite3 installed, but not php's driver for it. The driver is also called sqlite3, so for e.g. Ubuntu/Debian that would be sudo apt-get install php7.2-sqlite3.

Sign up to request clarification or add additional context in comments.

1 Comment

yes perfect thanks! had to run it for php7.1 but works. thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.