Dashboard is empty after v5.0 update

Please follow the below template, it will help us to help you!

Expected Behaviour:

Running on a Raspberry Pi 3B+ Dashboard used to indicate blocked/allowed... queries.
Rebooted system; reconfigured Pi-hole; still no changes.
Noticed that hostname changed from "pi.hole" in the previous v4.3 version to "raspberrypi" after the update.

Actual Behaviour:

Dashboard has no data.

Debug Token:

https://tricorder.pi-hole.net/3cbw1ewl2i

Thank you for your quick response.
Unfortunately, there is still no data in the Dashboard.

pi@raspberrypi:~ $ groups www-data 
www-data : www-data pihole
pi@raspberrypi:~ $ ls -Al /etc/pihole
total 26092
-rw-r--r-- 1 root   root        242 May 16 00:32 adlists.list
-rw-r--r-- 1 root   root        313 Apr 30 17:58 adlists.list.old
-rw-r--r-- 1 root   root          0 May 13 20:14 black.list
-rw-r--r-- 1 root   root         18 May 15 23:05 custom.list
-rw-r--r-- 1 pihole pihole        0 May 16 09:08 dhcp.leases
-rw-r--r-- 1 root   root        596 May 16 00:33 dns-servers.conf
-rw-r--r-- 1 root   root         14 May 16 09:09 GitHubVersions
-rw-rw-r-- 1 pihole pihole  6422528 May 16 00:34 gravity.db
-rw-r--r-- 1 root   root    1932203 May 13 20:14 gravity.list
-rw-r--r-- 1 root   root       1051 May 16 00:33 install.log
-rw-r--r-- 1 root   root    1140611 May 16 00:34 list.0.raw.githubusercontent.com.domains
-rw-r--r-- 1 root   root     594672 May 16 00:34 list.1.mirror1.malwaredomains.com.domains
-rw-r--r-- 1 root   root     412413 May 16 00:34 list.2.sysctl.org.domains
-rw-r--r-- 1 root   root        521 May 16 00:34 list.3.s3.amazonaws.com.domains
-rw-r--r-- 1 root   root      43529 May 16 00:34 list.4.s3.amazonaws.com.domains
-rw-r--r-- 1 root   root         20 May 16 09:20 localbranches
-rw-r--r-- 1 root   root         42 May 16 00:34 local.list
-rw-r--r-- 1 root   root         36 May 16 09:20 localversions
-rw-r--r-- 1 root   root        234 May 16 00:33 logrotate
-rw-r--r-- 1 pihole pihole  2457600 May 15 23:02 macvendor.db
drwxr-xr-x 2 root   root       4096 May 15 23:02 migration_backup
-rw-rw-r-- 1 pihole root         15 May 16 00:33 pihole-FTL.conf
-rw-r--r-- 1 pihole pihole 13639680 May 16 09:26 pihole-FTL.db
-rw-r--r-- 1 root   root        409 May 16 00:33 setupVars.conf
-rw-r--r-- 1 root   root        409 May 16 00:28 setupVars.conf.update.bak

Is php-sqlite3 installed on your device?

You're using apache as web server, right? Are there any errors in the server log?

Yes, sqlite is installed.

~ $ sqlite3 
SQLite version 3.16.2 2017-01-06 16:32:41

There is definitely something to look into here:

[Sat May 16 11:06:34.015369 2020] [:error] [pid 1541] [client 10.0.0.x] PHP Notice:  Use of undefined constant SQLITE3_OPEN_READONLY - assumed 'SQLITE3_OPEN_READONLY' in /var/www/html/admin/scripts/pi-hole/php/database.php on line 61, referer: http://10.0.0.y/admin/index.php
[Sat May 16 11:06:34.015765 2020] [:error] [pid 1541] [client 10.0.0.x] 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(68): gravity_last_update()\n#3 {main}\n  thrown in /var/www/html/admin/scripts/pi-hole/php/database.php on line 42, referer: http://10.0.0.y/admin/index.php

Also the php-sqlite3 package?

"PHP Notice: Use of undefined constant SQLITE3_OPEN_READONLY“

2 Likes

Just installed php-sqlite3 right now. And... it works! Thank you so much.
That also solved 500 - internal server errors for the Groups page and Network page.

I thought the php-sqlite3 was available from the beginning, as stated here:
https://www.php.net/manual/en/sqlite3.installation.php

The SQLite3 extension is enabled by default as of PHP 5.3.0. It's possible to disable it by using --without-sqlite3 at compile time.

I had the same issue when running Pi-hole v5.0 behind Apache.
In my case the problem was that the Apache module php7.2 was enabled but php7.3 was actually installed. That solved it:

a2dismod php7.2
a2enmod php7.3
systemctl restart apache2

A post was split to a new topic: Dashboard problems 5.0 and Apache

For me, this issue hit after PHP upgrade to 8.0; needed to upgrade to php8.0-sqlite3 as well.
Thanks a ton @yubiuser

1 Like