#26389 [Opn->Bgs]: Use an sqlite db...

From: Date: Tue, 25 Nov 2003 01:03:02 +0000
Subject: #26389 [Opn->Bgs]: Use an sqlite db...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50941@lists.php.net to get a copy of this message
ID: 26389 Updated by: iliaa@php.net Reported By: php at plouk dot net -Status: Open +Status: Bogus Bug Type: SQLite related Operating System: Linux debian PHP Version: 5.0.0b2 (beta2) New Comment: If you are running it not via a webserver (user != nobody) chmod the file 666. Otherwise re-open the bug. Previous Comments: ------------------------------------------------------------------------ [2003-11-24 16:48:15] php at plouk dot net The script result : ------------------ resource(2) of type (sqlite database) NULL bool(false) ------------------------------------------------------------------------ [2003-11-24 16:46:50] php at plouk dot net Description: ------------ This script isn't able to create a table in an existing database. Why? (No error are detected and permissions on the database file seem all right) #ls -l -rw-rw-r-- 1 nobody nogroup 263 Nov 24 23:42 sqlite.php -rw-rw-rw- 1 nobody nogroup 0 Nov 24 22:45 test.db Reproduce code: --------------- <?php //sqlite.php $db=sqlite_open('test.db', 0666, $sqlite_err); echo var_dump($db).'<BR />'; echo var_dump($sqlite_err).'<BR />'; $req="CREATE TABLE my_table (value INTEGER PRIMARY KEY)"; $res=sqlite_query($db,$req); echo var_dump($res).'<BR />'; sqlite_close($db); ?> Expected result: ---------------- A table Actual result: -------------- Nothing, the db file is always a 0 byte's file... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26389&edit=1

« previous php.bugs (#50941) next »