Pi-hole missing SQLite3

Pi-Hole is an ad blocker you run on a Raspberry Pi on your local network to provide ad blocking services to all the devices in your home.

A new install of Pi-Hole

When installed normally it uses Lighttpd but I already had Apache2 on my Raspberry Pi. There are a few threads and this doc about migrating to Apache2 but none of them mention SQLite3.

If you don’t have that module installed the ad blocking part will still work but the web admin will show an almost empty page. Look in /var/log/apache2/error.log and you’ll see an error like this:

PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /var/www/html/admin/scripts/pi-hole/php/database.php

It’s easy to install the SQLite3 mod for PHP:

sudo apt install php-sqlite3

Then restart Apache2

sudo service apache2 restart 

I’ve had Pi-Hole installed for years but I think I ran into the read-only problem mentioned here too. As stated in the doc above, the fix is simple. Add the Apache user to the pihole group. That will allow you to update various settings from the web admin.

sudo usermod -a -G pihole www-data

2 thoughts on “Pi-hole missing SQLite3

  1. If your pi-hole doesn’t show any graphics in the web interface you probably don’t have PHP installed. This will help:
    sudo apt install php libapache2-mod-php

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close