$ wget http://ir.php.net/get/php-5.2.9.tar.gz/from/us.php.net/mirror
$ tar xzf php-5.2.9.tar.gz
$ cd php-5.2.9/ext/sqlite
$ phpize
$ ./configure
$ make
$ make install
check if sqlite.so was copied to /usr/lib/php/modules if there is sqlite.so
then go to /etc/php.d and create sqlite.ini
$ touch sqlite.ini
$ echo 'extension=sqlite.so' > sqlite.ini
and restart apache
$ /etc/init.d/httpd restart