开发者

SQLite, PDO, and PHP: New inserts not being saved

开发者 https://www.devze.com 2023-01-21 03:38 出处:网络
I have a few PHP (version 5.1.6) scripts and an sqlite3 database. For a while, everything was working fine, including inserts, updates, selects, and deletes.

I have a few PHP (version 5.1.6) scripts and an sqlite3 database. For a while, everything was working fine, including inserts, updates, selects, and deletes.

Now:

  • Select statements still work fine
  • Inserts, deletes, and updat开发者_运维问答es all fail without an error that I can see. A -journal file is created in the same directory as the database, but it later disappears. The sqlite file remains unmodified.

I can't really figure out what, if anything, has changed. Permissions are the same. I've been able to open and save the database in another program, and replaced it with that version, but I still have the same problem. The scripts originally were all in autocommit mode; using explicit commits does not fix the problem either.

If I replace the database file with an older backup, everything works just fine.

I'd appreciate any ideas for troubleshooting. Thank you!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消