SQLite, PDO, and PHP: New Inserts Not Saved

I have several PHP scripts (version 5.1.6) and sqlite3 database. For a while, everything worked fine, including inserts, updates, selection, and deletion.

Now:

  • Operator selection still working fine
  • Inserts, deletes and updates all the failure without the error that I see. The file -journalis created in the same directory as the database, but later it disappears. The sqlite file remains unmodified.

I can’t understand what has changed. Permissions are the same. I was able to open and save the database in another program and replace it with this version, but I still have the same problem. Initially, the scripts were in automatic mode; using explicit commits also does not fix the problem.

If I replaced the database file with an older backup, everything will work fine.

I would appreciate any troubleshooting ideas. Thank!

+3
source share
1 answer

Take a look at permissions. Make sure that PHP / Apache has read / write capability and owns the SQLite database folder and file.

0
source

Source: https://habr.com/ru/post/1770559/


All Articles