SQLite database inside Phar archive-Collection of common programming errors
After some research, I realized, that problem can be solved by a little hack.
- Copy database file to system’s temporary directory
- Connect PDO to database copy and do your operations
- Overwrite original database file with modified copy.
Not very reliable solution – you need to be careful about unhandled errors or exceptions, because you may lose your changes.