up one level
---


How to solve phpLiteAdmin – ERROR: unable to open database file…

Applies to:
Ubuntu 12.04
Apache 2.2.22
phpLiteAdmin v.1.9.5

With phpLiteAdmin. I had just “installed” the .php script (put it in its own empty directory on my web server.)

I got a message I can’t create a new database. So I put a preexisting one there.
Then I tried to drop a view in that database.

I got:
“…
ERROR: unable to open database file…
…”

screenshot:


I logged into my Linux server’s gui and I tried modifying the permissions on the database to allow setting “others” to Read and write. But still couldn’t drop the view.
Then I tried modding permissions on the directory containing the database.

What worked for me finally:

On the directory containing the sqlite database, I right-clicked on the directory and chose Properties. Clicked on the Permissions tab. Set “Others > Folder access:” to “Create and delete files” and its File access: to “Read and write”, and clicked the “Apply Permissions to Enclosed Files” button.

Screenshot:


I’m not sure whether this is the best nor most secure way of solving this. But it fixed it for me- now I can log in to phpLiteAdmin and delete the view without seeing the “ERROR: unable to open database file…” message.


[2019 edit: Moved to: https://i̶n̶v̶e̶s̶t̶o̶r̶w̶o̶r̶k̶e̶r̶.̶c̶o̶m̶/2015/... .html.]