Dashboard problems 5.0 and Apache

I am running Pihole behind Apache. It worked fine with version 4.4. After upgrading to 5.1.2, the dashboard is showing --- for all three boxes (Total queries, queries blocked and percent blocked). Other tabs are showing data. It's just the Dashboard (including the Status area) which is messed up.

I checked and I already have php7.3 enabled.

What to do?

Please post a screen capture of what you see. You can paste directly into a reply here.

There are queries in the query log, so it is definitely running.

Have you cleared the browser cache and reloaded the page?

The Load started showing after doing CTRL-Reload in Chrome:

I tried with another browser (Edge). No difference (except uglier).

I restarted Apache. No change.
I also tried the usermod -aG pihole www-data command suggested earlier. (Although I didn't want to restart the pi...)

Perhaps this message in the Apache error log can give some clue to the fault?

[Tue Aug 25 00:06:21.307542 2020] [php7:error] [pid 26473] [client 192.168.1.36:65496] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /var/www/html/admin/scripts/pi-hole/php/database.php:42\nStack trace:\n#0 /var/www/html/admin/scripts/pi-hole/php/database.php(65): SQLite3_connect_try('/etc/pihole/gra...', 'SQLITE3_OPEN_RE...', true)\n#1 /var/www/html/admin/scripts/pi-hole/php/gravity.php(13): SQLite3_connect('/etc/pihole/gra...')\n#2 /var/www/html/admin/index.php(73): gravity_last_update()\n#3 {main}\n thrown in /var/www/html/admin/scripts/pi-hole/php/database.php on line 42, referer: http://192.168.1.19/admin/settings.php

Please install the appropriate sqlite3 module for the PHP your apache server is using. This is outside the scope of the Pi-hole project as replacing the server is a custom extension.

Please use the search of the forum, there are many (MANY) topics around PHP and apache. I just picked this random one, maybe it already helps you:

3 Likes

It's a bit weird though that it was working fine on 4.4, but not for 5.1.2.

I did the following (a summary of the page How to install SQLite for PHP on a Apache/Nginx server | Astra Security):

php -v
sudo apt-get install php7.3-sqlite
sudo service apache2 restart

Then reloaded the page, and - lo and behold - it started working again! :slight_smile:
Thank you @Coro!

Some extra information which hopefully might help someone in the same situation as I was. You need to get the following results, or you need to install sqlite3 on your Apache server.

pi@plex ~ $ php -m | grep 'json\|sqlite'
json
pdo_sqlite
sqlite3

Thats called progress :wink:
From the 5 release onwards, allot of data is stored in databases now:

https://pi-hole.net/2020/05/10/pi-hole-v5-0-is-here/#page-content

1 Like

:wink:
Nice! I like progress.
And I'm super happy that its working again. I'll read the v5.0 release notes now :slight_smile:

1 Like

If want to know more:

https://docs.pi-hole.net/database/

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.