I am trying to install sqlite3 for PHP in Ubuntu.
I install apt-get php5-sqlite3
and edited php.ini
to include sqlite3 extension.
When I run phpinfo();
I get
SQLITE3
SQLite3 support enabled
sqlite3 library version 3.4.2
as shown above, sqlite3
is enabled. However, I get "Class SQLite3 not found" when I use
new SQLite3("database");
That worked for me.
Try:
That worked for me.
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.
Ripped from the ubuntu form.
In Centos 6.7, in my case the library file /usr/lib64/php/modules/sqlite3.so was missing.