Created
November 21, 2012 22:01
-
-
Save developernotes/4128151 to your computer and use it in GitHub Desktop.
Dump the SQLCipher version in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$db = new SQLite3("demo.db"); | |
$version = $db->query("PRAGMA cipher_version"); | |
if($version){ | |
var_dump($version->fetchArray()); | |
} else { | |
throw new Exception($db->lastErrorMsg()); | |
} | |
$db->close(); | |
} | |
catch (Exception $e){ | |
echo "Exception", $e->getMessage(), "\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nick, I've noted you've helped lots of people with SQLCipher and PHP issues, so I humbly come to you in the hope that you can provide me some guidance as well. I need to implement SQLite encryption in a x64 Windows Apache/PHP installation. I've managed to compile PHP and SQLCipher separately (using both VS2015 and MinGW-w64), but I don't know what to do to integrate them both. If I try to simply replace the original PHP files with those generated by SQLCipher's, I get a compilation error ("undefined struct sqlite3_mutex"). Can you point me in any direction? Thanks!