how to enable sqlite3 for php?
Edit: This answer is outdated, but can't be removed because it's accepted. Please see the solution from Stacey Richards for the correct answer.
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
Ripped from the ubuntu form.
For PHP7, alter the below for your version of PHP (7.0, 7.2, 7.4, etc) and run
sudo apt-get install php7.0-sqlite3
and restart Apache
sudo apache2ctl restart
Try:
apt-get install php5-sqlite
That worked for me.