Half of DNS settings disappear

Expected Behaviour:

I ran pihole on Arch on a Raspberry Pi. I went to /admin/settings.php?tab=piholedhcp and checked the "DHCP server enabled" option and clicked "Save". I expected the DHCP server to start.

Actual Behaviour:

The DHCP server did not start, and half of the settings page disappeared.

In the logs I can see the following error:

 2022/04/29 15:21:21 [error] 506#506: *314 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: feof(): Argument #1 ($stream) must be of type resource, bool given in /srv/http/pihole/admin/settings.php:581
 Stack trace:
 #0 /srv/http/pihole/admin/settings.php(581): feof()
 #1 {main}
   thrown in /srv/http/pihole/admin/settings.php on line 581" while reading upstream, client:, server: _, request: "POST /admin/settings.php?tab=piholedhcp HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "", referrer: ""

Ok, this issue was solved by running

install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases

Please consider to report that to the ArchLinux community as well.

ArchLinux is not officially supported by Pi-hole, but they kindly maintain their own AUR package for Pi-hole, so they may be interested in your findings (and perhaps may even be able to address them).

1 Like

Thanks for the tip! I reported it in the AUR page for the package: https://aur.archlinux.org/packages/pi-hole-server#comment-864933