Friday 15 May 2015

php - SQLite database inside Phar archive -


I am trying to access the SQLite database in the archive store via the PDO extension, but I am getting the error: Unable to open the 'PDO Exception' database file with the 'blocktit' message 'SQLSTATE [HY000] [14] PHP manual says it is possible to modify the file in archival. How can I fix this?

After some research, I realized, that the problem can solve a bit.

  1. Copy the database file to the system's temporary directory
  2. Connect to a PDO to copy the database and do your operation
  3. The revised copy Overwrite the original database file with

    is not a very reliable solution - you need to be careful about uncontrolled errors or exceptions, because you can lose your change.

No comments:

Post a Comment