From dfee22901d7c5defc61ef16e831d7c4a8f05ffd1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 19 Nov 2017 13:03:36 +0300 Subject: * use PDO::sqlite * remove database-backed sessions (too slow for sqlite) --- db.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'db.php') diff --git a/db.php b/db.php index 5c94ecb..ad74639 100644 --- a/db.php +++ b/db.php @@ -4,9 +4,9 @@ class Db { private $dbh; private function __construct() { - $this->dbh = new SQLite3(SCRATCH_DB); - $this->dbh->busyTimeout(30*1000); - $this->dbh->exec('PRAGMA journal_mode = wal;'); + $this->dbh = new PDO('sqlite:' . SCRATCH_DB); + //$this->dbh->busyTimeout(30*1000); + $this->dbh->query('PRAGMA journal_mode = wal;'); } public static function get() { -- cgit v1.2.3