How To Enable SQLite3 on Windows, Linux, Mac OS X

This post guides you how to enable/install SQLite3 on Windows (XAMPP, WAMP, etc.), Linux, and Mac OS X.

 

1. Windows

– Frist, open your php.ini file. You can find it within your web server folder or via its application GUI, for example:

  • XAMPP: C:\xampp\php\php.ini
  • WAMP: C:\wamp64\bin\apache\apache2.4.27\bin\php.ini

– Then find and change the following:

;extension=sqlite3

to (removed ;)

extension=sqlite3

 

2. Linux

  • For PHP 5
apt-get install php5-sqlite

 

  • For PHP 7
apt-get install php7.0-sqlite

 

3. Mac OS X

  • For PHP 5
sudo port install php5-sqlite

 

  • For PHP 7
sudo port install php7.0-sqlite

 
Finally, restart your web server.

guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Emmanuel Odero
Emmanuel Odero
8 months ago

For those using windows;
Navigate to the php.ini file(-C:\php\php.ini)
Enable the following:
;extension=pdo_sqlite by removing the /;/ should look like this extension=pdo_sqlite
;extension=sqlite3 should be extension=sqlite3 without the ; symbol

1
0
Would love your thoughts, please comment.x
()
x