Mailinglist Archive: opensuse (2224 mails)

< Previous Next >
Re: [opensuse] php5 -> sqlite3 error
  • From: "Cristian Rodriguez R." <judas_iscariote@xxxxxxxxxxxxx>
  • Date: Sat, 03 Feb 2007 00:55:09 -0300
  • Message-id: <45C4079D.9090600@xxxxxxxxxxxxx>
Daniel Bauer escribió:
> Hi list,
>
> I am trying to access a sqlite3 file with php5, but I get the error:
>
> Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a
> database
>
> I can open that file (its a digikam db) with knoda. For the test I gave the
> file and its folder rw rights for everybody. My script starts with:
>
> <?php
> $dbname='tst/tstdigikam3.db';
> if (!$db = sqlite_open($dbname, 0666, $err) )
> die("OpenFehler: $err");
> ...
>
> Any idea what I am doing wrong?
>

Yes, I do know what are you doing wrong. you are using the wrong
extension ;)

the sqlite extension supports only sqlite version 2, you need to use PDO
sqlite for sqlite 3,. it is included in the same package in 10.2.

See also http://php.net/pdo



< Previous Next >
Follow Ups
References