This error occurred after moving my project from Windows 10 to Ubuntu 22.04.
The development of the project included:
- Windows 10
- Laravel 5.8
- php7
- SQLite
The way i transferred the project files was through USB Drive. I need to mention that due to rushing my transition to Ubuntu for work needs i'm not yet comfortable with all the differences compared to Windows. I installed php7.4, sqlite3 and apache, fixed some simple errors after first starting the project and then came upon this error. I read about some similar cases but i'm yet unable to resolve this problem.
.env DB configurations
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
config/database.php configurations
//Never had an error before with the 'mysql' value. Chaning it to 'sqlite' didn't fix the problem
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
// I tried changing the value true to false. It just changes the error log
],