Every time I upload a working sqlite database to the server I see this error as a PHP error.
Every time I download a working sqlite database (generated by the server) from the server I see the specified error every time I try to access the database from the official sqlite3 CLI or even Sqlite Batabase Browser on my computer.
What temporary solutions I found
Dump the working database and create the database on the server using the previous generated dump file.
Attention
The database name is .common.db
You won’t see any error in my website.
I would be glad if someone could tell me what should I do.
Maybe your SQLite database file size exceeds 10 MBs which is the file size limit. To fix that problem you need to change the database driver from SQLite to MySQLi or PDO with MySQL, create a new MySQL database, connect to it using the new database host and database name you can find on the “MySQL Databases” section of the Control Panel along with the hosting account username and password which can be found on the same page of the Client Area on where you opened the Control Panel, then scrolling down to Account Details and clicking on “Show/Hide” to show the password, and then convert all SQLite rules to MySQL queries to execute (or the software you’re using will convert them automatically) and then your website will work fine.
I’m sorry, but I don’t fully understand the situation.
You say the SQLite database is generated on the server, but you also upload it to the server? And how exactly do you try to access it, and which tool shows this error message? You say it’s a PHP error, but you say you’re using the sqlite3 CLI?
I said I tried both.
But by the time of this message the database I am using was generated in your server.
On my computer I use sqlite3 CLI to see the error and on your server I saw the error on PHP logs.
Download my sqlite database file (.common.db) and try to read it using any software. You will see an error saying the database disk is malformed.
How can you reproduce the issue? (2nd option)
Create a sqlite file on your computer and upload it to the server, replacing .common.db
You will see a php error in my website saying that the database is corrupted.
I did some testing but could not reproduce the issue. I created a database on my computer, upload it to the hosting account, inserted some values to the table, read some values from the table, and downloaded the updated file. On my own computer, I could read the newly inserted values without any issues.