finally a bnode with a uri

How to add a missing SQLite extension to an existing PHP system (CentOS)

Creating an module for your existing PHP setup.
So I happily managed to upgrade my VServer to PHP 5.3. However, this did not enable SQLite 3 to be accessible from PHP. Luckily, I was not the only one facing this problem, and Mike Creuzer's answer on Stack Overflow worked for me almost without any changes. Here is the variation that worked on my 1&1 VServer:

The server didn't have the needed compiler, had to install gcc first:
yum install gcc
I had to install/update the php-devel package to enable extension building:
rpm -Uvh
yum --enablerepo=webtatic update php-devel
I needed a different PHP version ("php --version" will tell you which):
tar zxvf php-5.3.6.tar.gz
I wanted SQLite version 3, not 2:
cd php-5.3.6/ext/sqlite3
The rest was basically identical then:
make install
I created the extension file for SQLite3 (/etc/php.d/sqlite3.ini), added a pointer to the, and now (after restarting Apache) SQLite 3 is available via PHP's PDO interface. Stack Overflow++ :)

SeeAlso: CentOS locale issues.

Comments and Trackbacks

2 comments are currently in the approval queue.

Comments are disabled for this post.

Later Posts


No Posts found