Wednesday, September 5, 2012

SQLite3: Unable to open database: out of memory

Error

Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: out of memory'

While opening SQLite3 database using PHP

Solution

Changed the code from

$this->databaseConn = new SQLite3("$path",SQLITE3_OPEN_READONLY|SQLITE3_OPEN_CREATE);

To

$this->databaseConn = new SQLite3("$path",SQLITE3_OPEN_READONLY);

Makes more sense ...  isn't it  :)


1 comment:

  1. That doesn't solve the problem if you want to create the database

    ReplyDelete