Home >Backend Development >PHP Tutorial >Permission issues for sqlite database reading and writing under Linux
I am learning Linux recently, and I happened to have a PHP project to do, so I configured the environment and planned to do it under Linux.
Unfortunately, the website went blank after running. After debugging, it was found that it was a problem with the sqlite database.
Install the sqlite extension
apt-get install php5-sqliteCheck the /var/log/apach2/error.log log file and find the following line
SQLSTATE[HY000]: General error: 8 attempt to write a readonly database
chmod g+w db.sqlite
SQLSTATE[HY000]: General error: 14 unable to open database file
chown www-data db.sqlite
The above introduces the permission issues of sqlite database reading and writing under Linux, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.