PHP 5.4 discontinued support for SQLite 2 databases. Updating an old legacy PHP application with a SQLite database to a new server is not very difficult.
To start off, you will need the SQLite binaries so that you can convert the database between versions:
sudo apt-get install sqlite sqlite3
Now that you have the binaries installed, you can convert your version 2 SQLite database to version 3:
sqlite version2.db .dump | sqlite3 version3.db
Now you will need to update your PHP script with the following translations
$handle = sqlite_open($file)
$handle = new SQLite3($file)