System is CentOS 7.4, selinux is set to permissive
to add a little, my status also shows unknown. If i click enable, it will green up until i click or refresh, then it's unknown again. That said, everything is working, so this may be cosmetic.
In your debug log I see some errors in your /var/log/lighttpd/error.log like:
2017-12-28 10:59:00: (mod_fastcgi.c.434) FastCGI-stderr: PHP Fatal error: Can't use function return value in write context in /var/www/html/pihole/index.php on line 108
2017-12-28 10:59:54: (mod_fastcgi.c.434) FastCGI-stderr: PHP Fatal error: Can't use function return value in write context in /var/www/html/pihole/index.php on line 108
do these coincidence with the times you tried to save something?
They do not, here is how I checked
I opened up a tail session on /var/log/lighttpd/error.log
i logged into the webmin and made a dns change, i clicked save. I clicked refresh (noted that the change has not saved) and verified no log entries in my tail session during this time.
to add to this, here are the referenced lines
// Determine if at least one block list has been generated
if (empty(glob("/etc/pihole/list.0.*.domains")))
die("[ERROR] There are no domain lists generated lists within <code>/etc/pihole/</code>! Please update gravity by running <code>pihole -g</code>, or repair Pi-hole using <code>pihole -r</code>.");
ls /etc/pihole/list.0.*.domains
-rw-------. 1 root root 1276933 Dec 28 11:27 /etc/pihole/list.0.raw.githubusercontent.com.domains
Okay, do you see anything in your SELinux logs? The webinterface in its current form is running small scripts in the background to save updates to the configuration, so if the webserver is not allowed to run the command pihole with arguments, saving the configuration will not work. We are working on an all-integrated API that can handle everything without having to rely on external scripts but that one is still very much in the works.
I do have some items in selinux logs, but since i'm in permissive mode, it's just logging what would've been blocked (i havent set any constraints since im permissive, so i expect failures for pihole things), not taking any action. here are the relevant lines
I just performed a fresh install on CentOS7 and I was able to successfully add additional block lists and change my upstream DNS without issues.
However, I do not get the same PHP errors as you..
Is this a fresh install or an upgrade?
have you reboot since the install?
what DNS settings are you attempting to change?
Your debug log states that you also have local changes in your web directory. What changes have you made?
i am getting the same error on a fresh install of pihole. attempting to load the initial web page generates a 500 error in the browser, and
2018-01-02 03:14:57: (mod_fastcgi.c.2683) FastCGI-stderr: PHP Fatal error: Can't use function return value in write context in /var/www/html/pihole/index.php on line 108
in the error.log.
i have never gotten the web page to work, so i'm not trying to even save anything!
[update] i am accessing 192.168.0.5 (the pihole server); when i access 192.168.0.5/admin i do get the admin console, but the default lighttpd index.html still doesn't display and returns 500 error
I also have (almost) this issue. Mine specifically is that i don't get the "blocking page" once i hit a blocked page (or http://pi.hole/ results in HTTP error 500). The error is similar:
2018-02-06 20:09:20: (mod_fastcgi.c.434) FastCGI-stderr: PHP Fatal error: Can't use function return value in write context in /var/www/html/pihole/index.php on line 108
I had to temporarily comment that specific line:
// Determine if at least one block list has been generated
//if (empty(glob("/etc/pihole/list.0.*.domains")))
// die("[ERROR] There are no domain lists generated lists within <code>/etc/pihole/</code>! Please update gravity by running <code>pihole -g</code>, or repair Pi-hole using <code>pihole -r</code>.");
I tried:
pihole -r
pihole -up
OS fully updated...
Nothing seems to help.
Everything else works fine, lists are being saved, updated...
OS details:
centos-release-7-4.1708.el7.centos.x86_64
Kernel: Linux 3.10.0-693.17.1.el7.x86_64
SELinux disabled
if (!glob("/etc/pihole/list.0.*.domains"))
die("[ERROR] There are no domain lists generated lists within <code>/etc/pihole/</code>! Please update gravity by running <code>pihole -g</code>, or repair Pi-hole using <code>pihole -r</code>.");