ID: 28235 Updated by: [EMAIL PROTECTED] Reported By: simen at lunarlounge dot org -Status: Open +Status: Feedback Bug Type: SQLite related Operating System: Debian/GNU testing PHP Version: 5.0.0RC2 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip We upgraded the bundled sqlite library; please try the next snapshot (you might have to wait up to 3 hours) and see if this is fixed. Previous Comments: ------------------------------------------------------------------------ [2004-05-13 12:43:18] nobody at example dot org Never occured to me that this could be a bug, does the OO API handle this? function connect(){ try { if ( !$this->db_handle = @sqlite_open($this->db_name, 0666, $err) ){ if ($this->db_handle===false){ throw new DBEx('0: Could not open/create db or directory'); } else { throw new DBEx(sqlite_last_error($this->db_handle).': '. sqlite_error_string(sqlite_last_error($this->db_handle))); } } else { return true; } } catch (DBEx $ex){ $ex->borkage(); return false; } } ------------------------------------------------------------------------ [2004-04-30 16:41:07] simen at lunarlounge dot org Description: ------------ The SQLite extension fail to detect when a database file isn't writable: Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on line 12 Reproduce code: --------------- # touch test.sqlite # chmod 0600 sqlite # sqlite test.sqlite > CREATE TABLE store (id INTEGER PRIMARY KEY, doc TEXT); $db = sqlite_open('test.sqlite'); $sql = "INSERT INTO store (id, doc) VALUES (1, 'foo')"; $result = sqlite_query($db, $sql); Expected result: ---------------- Warning: sqlite_query() [function.sqlite-query]: attempt to write a readonly database in test.php on line 12 Actual result: -------------- Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on line 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28235&edit=1
