PHP SQlite3 with PDO

If you want to use SQlite3 databases with PHP you should probably use PDO.

Install it like this:

su
apt-get install php5 php5-sqlite
echo -e "\nextension=pdo.so\n" >> ../conf/php.ini

Note: You don't need any command like pecl install pdo_sqlite or pecl install pdo as PDO is now included in the package php5-sqlite (and php5-mysql). In my case this broke my PHP installation and I had to run the following to get it back working:

su
pecl uninstall pdo pdo_mysql pdo_sqlite
apt-get reinstall php5-common php5-sqlite

For examples see the invoices project.

Comments