{"id":1921,"date":"2022-08-30T15:20:33","date_gmt":"2022-08-30T15:20:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/sqlite-database-inside-phar-archive-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:20:33","modified_gmt":"2022-08-30T15:20:33","slug":"sqlite-database-inside-phar-archive-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/sqlite-database-inside-phar-archive-collection-of-common-programming-errors\/","title":{"rendered":"SQLite database inside Phar archive-Collection of common programming errors"},"content":{"rendered":"<p>After some research, I realized, that problem can be solved by a little hack.<\/p>\n<ol>\n<li>Copy database file to system&#8217;s temporary directory<\/li>\n<li>Connect PDO to database copy and do your operations<\/li>\n<li>Overwrite original database file with modified copy.<\/li>\n<\/ol>\n<p>Not very reliable solution &#8211; you need to be careful about unhandled errors or exceptions, because you may lose your changes.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-12-02 21:18:24. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>After some research, I realized, that problem can be solved by a little hack. Copy database file to system&#8217;s temporary directory Connect PDO to database copy and do your operations Overwrite original database file with modified copy. Not very reliable solution &#8211; you need to be careful about unhandled errors or exceptions, because you may [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1921","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1921"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1921\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}