I've written a small bit of PHP to test reading data from an SQLite database. I created the database on my dev machine and when I try the PHP code from my dev web server all the data is read as I'd expect.
I've uploaded this to my live site, which is also running PHP5 and has SQLite3 support and when I try to read the table it fails. The database opens without error but when I do a query I get 0 rows back.
Dev platform is Windows 7 (and Linux if I change machines!) and live platform is Linux.
I made sure the DB file was uploaded as binary >:)
It was my understanding the a SQLite database file was platform portable (http://www.sqlite.org/onefile.html
) and so I'm at a loss as to why this doesn't work.
My test code is here : http://crimsoncatz.com/dbtest.php
It's outputting phpinfo and then trying to read the data from the DB to generate a table. If all goes well it should look something like this...
Basically, I've moving from having prices embedded in static HTML to being read from the DB file. I'm using SQLite as the data is small and we don't want the extra cost we'd need to pay for MySQL services.
I've attached a copy of the database file zipped.
I'd really like to try and get this working so help would be appreciated.
Note. I am not a PHP guru, this is my first time coding in it.