php fatal error: class sqlite3 is not found in

harishkumar329 picture harishkumar329 · Oct 24, 2013 · Viewed 31.8k times · Source

Im using ubuntu 12.04, and php 5.x I need to use sqlite3 in it but Im getting an error of

php fatal error: class sqlite3 not found

I done all the installation processes,

like

$ sudo apt-get install php5-cli php5-dev make
$ sudo apt-get install libsqlite3-0 libsqlite3-dev
$ sudo apt-get install php5-sqlite3
$ sudo apt-get remove php5-sqlite3
$ cd ~
$ wget http://pecl.php.net/get/sqlite3-0.6.tgz
$ tar -zxf sqlite3-0.6.tgz
$ cd sqlite3-0.6/
$ sudo phpize
$ sudo ./configure
$ sudo make
$ sudo make install
$ sudo apache2ctl restart

and

cd /etc/php5/conf.d

cat > sqlite3.ini
# configuration for php SQLite3 module
extension=sqlite3.so
^D

sudo /etc/init.d/apache2 restart

now what else I want to do???

Can anyone please help me to fix this...

Thankyou In advance.

Answer

harishkumar329 picture harishkumar329 · Oct 25, 2013

Found a solution my self,

I installed

 $ sudo apt-get install php5-sqlite

not

 $ sudo apt-get install php5-sqlite3

and using sqlite3 class only.. no issue now.