Bug #50858 [Csd->Bgs]: $encryption_key parameter seems to be ineffective
| From: | felipe@php.net | Date: | Sun, 13 Jun 2010 18:05:01 +0000 |
| Subject: | Bug #50858 [Csd->Bgs]: $encryption_key parameter seems to be ineffective | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151450@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50858&edit=1
ID: 50858
Updated by: felipe@php.net
Reported by: roger dot olivier at gmail dot com
Summary: $encryption_key parameter seems to be ineffective
-Status: Closed
+Status: Bogus
Type: Bug
Package: SQLite related
Operating System: win32 only - Windows XP Sp3
PHP Version: 5.3.1
Assigned To: scottmac
Previous Comments:
------------------------------------------------------------------------
[2010-06-13 20:04:29] felipe@php.net
The encryption_key will be used if the SQLITE_HAS_CODEC was properly
defined in the build.
------------------------------------------------------------------------
[2010-01-27 10:12:05] roger dot olivier at gmail dot com
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 this bug report at http://bugs.php.net/bug.php?id=50858&edit=1