SQLCipher + WAMP?

226 views
Skip to first unread message

Rhonda Kern

unread,
Aug 2, 2011, 4:02:19 PM8/2/11
to SQLCipher Users
I am trying to develop an application that uses WAMP (Windows Apache
MySQL PHP) - only I'd like to use SQLCipher as the database instead of
MySQL.
When I installed the WAMP Server, it included PHP with sqlite pre-
compiled into that binary.

Does anyone know: a) If what I'm trying to do is possible, or b)
Forget WAMP - How do I install PHP so that I can use SQLCipher?

This is a time sensitive project, so quick replies would be very
appreciated!

Stephen Lombardo

unread,
Aug 3, 2011, 9:10:19 AM8/3/11
to sqlc...@googlegroups.com
Hi Rhonda,

Do you know if PHP statically linked SQLite, or if it uses the shared library? I strongly suspect that it's probably using the system .so if you installed if from a linux distribution package. 

If that is the case, you should be able to wire in SQLCipher by changing the LD_LIBRARY_PATH environmental variable to reference the location of the sqlcipher .so library in the PHP execution environment (probably the apache startup scripts), i.e. 

export LD_LIBRARY_PATH=/path/to/sqlcipher/lib:$LD_LIBRARY_PATH 

This approach works really well for applications tools and libraries that use the .so (it's known to work for perl, python, and ruby). 

Can you give that a shot, we'd love to hear if it works for you?

Cheers,
Stephen

Rhonda Kern

unread,
Aug 3, 2011, 11:56:06 AM8/3/11
to SQLCipher Users
When I install the WAMP server (like LAMP - only for Windows) it
includes PHP 5.3.5.0.

We had previously purchased the Windows binary of SQLCipher.

In the PHP folder there is a "php_sqlite3.dll" so we tried replacing
that file with the pre-compiled "sqlite3.dll" that we'd purchased, and
renamed it so it would match the other file. That didn't work. We got
the the message, "PHP Warning: PHP Startup: Invalid library (maybe not
a PHP library) 'php_sqlite3.dll' in Unknown on line 0"

If anyone has been able to get PHP with SQLCipher to work under
Windows, I'd be grateful to know the recipe used to get it to work.

Stephen Lombardo

unread,
Aug 3, 2011, 1:54:51 PM8/3/11
to sqlc...@googlegroups.com
Hi Rhonda,

I think that php_sqlite3.dll is probably a PHP specific wrapper to sqlite3. Is sqlite3.dll (no php_ prefix) present anywhere on the system?

Cheers,
Stephen
Reply all
Reply to author
Forward
0 new messages