#50858 [NEW]: $encryption_key parameter seems to be ineffective
From: roger dot olivier at gmail dot com
Operating system: Windows XP Sp3
PHP version: 5.3.1
PHP Bug Type: SQLite related
Bug description: $encryption_key parameter seems to be ineffective
Description:
------------
The use of the encryption_key parameter in the SQLite3::open method don't
works whereas the sqlite3 extension is compiled with the support of SEE
(http://www.hwaci.com/sw/sqlite/see.html)
The extension as been compiled in VC9 with the following configure :
configure --enable-apache2-2handler --with-sqlite3=shared
--enable-pdo=shared --with-pdo-sqlite=shared --enable-cgi --without-t1lib
--enable-cli-win32
--with-extra-includes=d:/projets/php-sdk/Apache2/include;d:/projets/php-sdk/icu/include
--with-extra-libs=d:/projets/php-sdk/Apache2/lib;d:/projets/php-sdk/icu/
The new php_sqlite3.dll and php_pdo_sqlite.dll are used to replace the dll
present in the binary (still 5.3.1 VC9).
Note : The use of PRAGMA key = 'mykey' works fine , it's just the use of
the encryption_key parameter which seems broken
Reproduce code:
---------------
<?php
$db = new SQLite3('db/mydb.crypt',SQLITE3_OPEN_READWRITE,'aes128:mykey');
$result = $db->query('SELECT COUNT(*) from users');
var_dump($result->fetchArray());
?>
Expected result:
----------------
array(2) { [0]=> int(1) ["COUNT(*)"]=> int(1) }
Actual result:
--------------
Unable to prepare statement: 26, file is encrypted or is not a database in
--
Edit bug report at http://bugs.php.net/?id=50858&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50858&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50858&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50858&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50858&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50858&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50858&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50858&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50858&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50858&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50858&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50858&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50858&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50858&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50858&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50858&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50858&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50858&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50858&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50858&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50858&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50858&r=mysqlcfg
Thread (4 messages)
- roger dot olivier at gmail dot com