But it seems PHP5 underwent a big change in "PDO" for SQLite.
I went around the houses looking at errors like "Class 'SQLite3' not found php" and " Fatal error: Call to undefined function sqlite_open()"
But... finally I found: http://djhweb.co.uk/sqlite1.htm
So I had to change the code:
Then:$db = sqlite_open('filename',0666)to$db = new PDO('filename');
$res = sqlite_query($db, $query, SQLITE_ASSOC);to$res = $db->query($query);
I might have got some of this wrong... but hopefully not!
If you hit "SQLSTATE[HY000]  unable to open database file" then that means you need to open up read/write permissions on the database directory.