ThorntonStuart
ThorntonStuart

Reputation: 139

SQLSTATE[HY000]: General error: 14 unable to open database file - Laravel

Running a Laravel Homestead Vagrant box which is using PHP 5.6. The database is an sqlite file. I am getting this error:

SQLSTATE[HY000]: General error: 14 unable to open database file

This occurs when attempting to insert login data in the database.

Both the database file and the containing folder are set to 777 permissions so I don't think this is a permissions issue, I have tried removing the containing folder and recreating the database to no avail.

Upvotes: 2

Views: 6856

Answers (2)

jai3232
jai3232

Reputation: 431

give the folder of the sqlite file to web owner or set full access

chown -R username:group folder_of_sqlite_file

or

chmod -R 777 folder_of_sqlite_file

Upvotes: 3

ThorntonStuart
ThorntonStuart

Reputation: 139

The solution to this was to change the permissions on the host machine and not inside the Vagrantbox terminal.

Upvotes: -1

Related Questions