views:

39

answers:

2

Hello,

I want to implement SQLite for my next project. I've done some research and I've found that PHP 5+ comes with two standard extenstions, that is:

  • SQLite found here ( php.net/manual/en/book.sqlite.php )

  • SQLite3 found here ( php.net/manual/en/book.sqlite3.php )

I want to know if number '3' represents the version. If it does, why SQLite3 doesn't come with procedural functions ? Which one is the best ?

P.S. - Is there a way to encrypt SQLite database using php ?

Sincerely, Alex from Romania

A: 

SQLite is for the SQLite version 2 and SQLite3 is for SQLite version 3. As for the lack of functions, I don't know, they haven't been implemented. I would suggest using SQLite3 so you can take full advantages of the newer version.

To my knowledge there is no way to encrypt SQLite databases specifically using PhP. Though one could fashion a solution using the mcrypt libraries or other such crypto libraries.

placing the database outside of your web directories and giving it proper permissions (owned by the user who runs the website with either 600 or 700 on it's permissions if you are on *nix) should be a step in the right direction to protecting the data.

Mimisbrunnr
A: 

Thank you very much for your help.