Dashboard is not loading properly

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

Expected Behaviour:

The pi-hole dashboard loads and I'll use my admin password and monitor the pi-hole's behaviour

Actual Behaviour:

Pi-hole dashboard doesn't loard no error message 


Debug Token:

https://tricorder.pi-hole.net/mq1714b0o4

Your debug token either failed to upload, or you omitted something by chance when pasting the token here.

Please send us a new token generated by

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Your debug token is: https://tricorder.pi-hole.net/vpre05dbqg

We do not support SELinux enforced. The installer should have displayed a screen to notify you of this.

*** [ DIAGNOSING ]: SELinux
[✗] Default SELinux: enforcing
[✗] Current SELinux: Enforcing
*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
X-Powered-By: PHP/7.2.11
Content-type: text/html; charset=UTF-8
Date: Sun, 08 Mar 2020 16:53:53 GMT
Server: lighttpd/1.4.55


[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!
2020-03-08 22:23:53: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning:  file(http://127.0.0.1/admin/scripts/pi-hole/php/queryads.php?domain=localhost&bp): failed to open stream: Permission denied in /var/www/html/pihole/index.php on line 130

Then what should I do to resolve that issue

Write a policy to allow what you would like to allow.

Finally I can now access the dashboard or the web interface but the reload icon keeps spinning

It is easier for us to help you when you copy and paste the token as text, rather than a screenshot of the text.

52s2ufgi1j

*** [ DIAGNOSING ]: Core version
[i] Core: v3.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: HEAD (https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#checkout)
[i] Commit: v3.2.1-0-ge602008

*** [ DIAGNOSING ]: Web version
[i] Web: v3.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: HEAD (https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#checkout)
[i] Commit: v3.2.1-0-g31dddd8

That's a very old version.

Now I'm runing the latest version yet doesn't change anything
https://tricorder.pi-hole.net/m7rykfe04q

-rw-r--r--. 1 lighttpd lighttpd 1723 Mar 10 09:12 /var/log/lighttpd/error.log
   2020-03-10 09:09:32: (server.c.1488) server started (lighttpd/1.4.55) 
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Uncaught Error: Call to undefined function json_encode() in /var/www/html/admin/api.php:139
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: Stack trace:
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: 
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr:   thrown in /var/www/html/admin/api.php on line 139
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Uncaught Error: Call to undefined function json_encode() in /var/www/html/admin/api.php:139
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: Stack trace:
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr: 
   2020-03-10 09:10:02: (mod_fastcgi.c.421) FastCGI-stderr:   thrown in /var/www/html/admin/api.php on line 139
   2020-03-10 09:11:03: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Uncaught Error: Call to undefined function json_encode() in /var/www/html/admin/api.php:139
   2020-03-10 09:11:03: (mod_fastcgi.c.421) FastCGI-stderr: Stack trace:
   2020-03-10 09:11:03: (mod_fastcgi.c.421) FastCGI-stderr: 
   2020-03-10 09:11:03: (mod_fastcgi.c.421) FastCGI-stderr:   thrown in /var/www/html/admin/api.php on line 139
   2020-03-10 09:12:03: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Uncaught Error: Call to undefined function json_encode() in /var/www/html/admin/api.php:139
   2020-03-10 09:12:03: (mod_fastcgi.c.421) FastCGI-stderr: Stack trace:
   2020-03-10 09:12:03: (mod_fastcgi.c.421) FastCGI-stderr: 
   2020-03-10 09:12:03: (mod_fastcgi.c.421) FastCGI-stderr:   thrown in /var/www/html/admin/api.php on line 139

https://discourse.pi-hole.net/search?q=centos%20json_encode

when I set my pihole DNS to a device my internet doesn't work.
https://tricorder.pi-hole.net/26dta132qa

Seems to be working, request from 192.168.1.4 is responded to correctly.

On the Pi-hole device run dig pi.hole @127.0.0.1 and dig pi.hole @192.168.1.4

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r--. 1 pihole pihole 5116 Mar 10 16:32 /var/log/pihole.log
   -----head of pihole.log------
   Mar 10 09:09:35 dnsmasq[6096]: started, version pi-hole-2.80 cachesize 10000
   Mar 10 09:09:35 dnsmasq[6096]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify dumpfile
   Mar 10 09:09:35 dnsmasq[6096]: using local addresses only for domain use-application-dns.net
   Mar 10 09:09:35 dnsmasq[6096]: using nameserver 8.8.4.4#53
   Mar 10 09:09:35 dnsmasq[6096]: using nameserver 8.8.8.8#53
   Mar 10 09:09:35 dnsmasq[6096]: read /etc/hosts - 2 addresses
   Mar 10 09:09:35 dnsmasq[6096]: failed to load names from /etc/pihole/local.list: No such file or directory
   Mar 10 09:09:35 dnsmasq[6096]: failed to load names from /etc/pihole/black.list: No such file or directory
   Mar 10 09:09:35 dnsmasq[6096]: failed to load names from /etc/pihole/gravity.list: No such file or directory
   Mar 10 09:09:46 dnsmasq[6096]: read /etc/hosts - 2 addresses
   Mar 10 09:09:46 dnsmasq[6096]: read /etc/pihole/local.list - 2 addresses
   Mar 10 09:09:46 dnsmasq[6096]: failed to load names from /etc/pihole/black.list: No such file or directory
   Mar 10 09:09:47 dnsmasq[6096]: read /etc/pihole/gravity.list - 125455 addresses
   Mar 10 09:09:47 dnsmasq[6096]: read /etc/hosts - 2 addresses
   Mar 10 09:09:47 dnsmasq[6096]: read /etc/pihole/local.list - 2 addresses
   Mar 10 09:09:47 dnsmasq[6096]: failed to load names from /etc/pihole/black.list: No such file or directory
   Mar 10 09:09:47 dnsmasq[6096]: read /etc/pihole/gravity.list - 125455 addresses
   Mar 10 09:12:12 dnsmasq[6096]: query[A] us.u1.yimg.com from 127.0.0.1
   Mar 10 09:12:12 dnsmasq[6096]: /etc/pihole/gravity.list us.u1.yimg.com is 0.0.0.0
   Mar 10 09:12:12 dnsmasq[6096]: query[A] us.u1.yimg.com from 192.168.1.4