phpinfo() says I have SQLite 3.x driver for PDO.

php.ini only mentions sqlite like so:

; http://php.net/sqlite.assoc-case
;sqlite.assoc_case = 0

;sqlite3.extension_dir =

I tried running sudo apt-get install php5-sqlite3 and it says: E: Unable to locate package php5-sqlite3

How do I enable sqlite? `


Looks like just some package name confusion. I believe in both cases, you're attempting "sqlite3" instead of just "sqlite".

A: Have you installed sqlite3 on the server?

# Note the package on Ubuntu is "sqlite", not "sqlite3"
$ sudo apt-get install sqlite

B: The PHP package is php5-sqlite

$ sudo apt-get install php5-sqlite


To search for available packages, you can use apt-cache:

$ apt-cache -n search php5-sqlite
> php5-sqlite - SQLite module for php5

$ apt-cache -n search sqlite
> ... other stuff ...
> sqlite - command line interface for SQLite
> sqlite-doc - SQLite documentation
> sqlite3-pcre - Perl-compatible regular expression support for SQLite
> sqlitebrowser - GUI editor for SQLite databases
> ... other stuff

Hope that helps!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.