0

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

php.ini only mentions sqlite like so:

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

[sqlite3]
;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? `

Rayhan Muktader
  • 103
  • 1
  • 3

1 Answers1

4

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

Lastly

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!

fideloper
  • 353
  • 3
  • 11