On 7/6/06, Albert van Bergen <[EMAIL PROTECTED]> wrote:
Hi All,

I pretty new into sqlite.

Is it possible to open a sqb database in php?


Use PDO_SQLITE for sqlite2 and sqlite3 PHP5 only, or use SQLite
extension for sqlite2. SQLite extension already built-in in PHP5, for
PHP4 you must load the php_sqlite extension first.

When I use sqlite_open I do get the following warning:

Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a
database in C:\Program Files\Apache Group\Apache2\htdocs\sql.php on line 2
file is encrypted or is not a database


I suspect if your file is sqlite database, but it's a sqlite file
format version 3 and you tried to open it with sqlite_open() which is
support only sqlite file format version3. You should use PDO_SQLITE
for open it. Also notes PDO currently support sqlite file format
version 3.2, no update yet. So be carefull with your database or your
data will lost.

--
Firman Wandayandi <http://firman.dotgeek.org/>

Reply via email to