From: wjzhhr at gmail dot com
Operating system: windwos xp
PHP version: 5.3.0
PHP Bug Type: SQLite related
Bug description: can't open encrypted sqlite3 database
Description:
------------
can't open encrypted database which created by wxSQLite.
<?php
$db = new SQLite3('x.db',SQLITE3_OPEN_READONLY,"1");
$db->exec("PRAGMA KEY='1'");
$result = $db->query('SELECT * FROM xxx');
var_dump($result->fetchArray());
?>
Warning: SQLite3::query(): Unable to prepare statement: 26, file is
encrypted or is not a database
Reproduce code:
---------------
---
>From manual page: sqlite3.open
---
Expected result:
----------------
my table: CREATE TABLE xxx(iswho text,itimes int);
liming|1
xiaojie|2
two records.
Expected result:
array(4) {
[0]=>
string(6) "liming"
["iswho"]=>
string(6) "liming"
[1]=>
int(1)
["itimes"]=>
int(1)
}
Actual result:
--------------
Warning: SQLite3::query(): Unable to prepare statement: 26, file is
encrypted or is not a database
--
Edit bug report at http://bugs.php.net/?id=49518&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49518&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49518&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49518&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49518&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49518&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49518&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49518&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49518&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49518&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49518&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49518&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49518&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49518&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49518&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49518&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49518&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49518&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49518&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49518&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49518&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49518&r=mysqlcfg