Edit report at http://bugs.php.net/bug.php?id=50858&edit=1
ID: 50858 Updated by: fel...@php.net Reported by: roger dot olivier at gmail dot com Summary: $encryption_key parameter seems to be ineffective -Status: Open +Status: Assigned Type: Bug Package: SQLite related Operating System: win32 only - Windows XP Sp3 PHP Version: 5.3.1 -Assigned To: +Assigned To: scottmac Previous Comments: ------------------------------------------------------------------------ [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