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.
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:
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.