Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable the PDO driver for sqlite3 in php?

My SQLite is version 3.4.0: image

However my phpinfo's PDO support for SQLitev3 is not enabled/listed: image

How can I enable it? I installed my web server via XAMPP.

like image 502
Keira Nighly Avatar asked May 30 '09 11:05

Keira Nighly


People also ask

How do I install PDO drivers?

Pdo ( Portable Data Object ) needs to be installed if it is not done before. For windows platform go to control panel > Add remove program ( or Programs and features ) > Select your PHP installation and click Change. If you are installing PHP fresh then in the setup wizard you can select PDO from Extensions link.

What is PDO SQLite?

Introduction ¶ PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to enable access to SQLite 3 databases. Note: PDO_SQLITE allows using strings apart from streams together with PDO::PARAM_LOB .

Can I use SQLite with PHP?

The latest SQLite extension is known as sqlite3 extension that is included in PHP 5.3+. The sqlite3 extension provides an interface for accessing SQLite 3. The sqlite3 includes class interfaces to the SQL commands. In addition, it allows you to create SQL functions and aggregate using PHP.


1 Answers

Go to your php.ini file and search for "sqlite". These are probably commented:

extension=php_pdo_sqlite.dll

extension=php_sqlite.dll

Uncomment them, and restart Apache.

like image 63
Mladen Janjetovic Avatar answered Sep 19 '22 22:09

Mladen Janjetovic