# Settings not saved via web interface

**URL:** <https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219>\
**Category:** Help\
**Created:** [May 17, 2017, 9:08pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219 "2017-05-17T21:08:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 17, 2017, 9:08pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/1 "2017-05-17T21:08:29Z")

</div>

more problems with pi-hole

settings changed on the web interface are not being saved

eg, changing the upstream dns servers?  
i can tick / untick boxes, click save and i get the confirmation message, but the boxes are still in their original state

im actually trying to set the dhcp server to on, but see the same behavior.

i have tried on multiple platforms, on multiple devices and still cannot get settings to be saved

i have alos ran `sudo puhole -r` and selected `repair` and no joy  
i have cleared browser cache, and rebooted my pi.  
all with no success

has anyone seen this?

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 17, 2017, 9:27pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/2 "2017-05-17T21:27:21Z")

</div>

Run `pihole -d` for a debug token.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 17, 2017, 9:39pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/3 "2017-05-17T21:39:27Z")

</div>

token is sfmup0fqjx

thanks

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 18, 2017, 3:51pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/4 "2017-05-18T15:51:37Z")

</div>

Does this file exist and is it readable by the `www-data` user? `/var/www/html/admin/scripts/pi-hole/php/header.php`  
There's lots of this in the web interface log:

```auto
2017-05-17 22:37:06: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning: require(scripts/pi-hole/php/header.php): failed to open stream: No such file or directory in /var/www/html/pihole/index.php on line 9
2017-05-17 22:37:06: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error: require(): Failed opening required 'scripts/pi-hole/php/header.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/pihole/index.php on line 9

```

Do you notice anything else amiss about the web interface? This error should cause many more things to break.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 18, 2017, 8:29pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/5 "2017-05-18T20:29:26Z")

</div>

thanks for taking a look @Mcat12

that file does exist, but im unsure to check if its readable by user `www-data` ??

using putty whilst ssh'd to my pi i can use `nano` and read the file as user `pi`

the only other thing i have noticed in the web interface is when i load it up, i see an `enable` button on the sidebar, right above the `tools` button.  
ive attached a screenshot

 ![](https://discourse.pi-hole.net/uploads/default/original/2X/8/8dfc5ce355eb49c8535a9bfca0772e32c91e9cb8.jpg)

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 12:02am UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/6 "2017-05-19T00:02:38Z")

</div>

9nw thing I have noticed is I am unable to access the admin page via `pi.hole/admin`  
I see a `pi.hole’s server DNS address could not be found` error.  
I have to use my local pi hole IP address

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 1:28am UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/7 "2017-05-19T01:28:53Z")

</div>

That means that your device isn't properly using Pi-hole as its DNS server. Run:

```auto
ls -al /var/www/html/admin/scripts/pi-hole/php/header.php
pihole status
sudo service dnsmasq status

```

and share the output.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 9:56am UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/8 "2017-05-19T09:56:10Z")

</div>

Thanks again

The out put is as follows

```auto
pi@raspberrypi:~ $ ls -al /var/www/html/admin/scripts/pi-hole/php/header.php
-rw-r--r-- 1 root root 25K May 4 14:23 /var/www/html/admin/scripts/pi-hole/php/header.php
pi@raspberrypi:~ $ pihole status
[sudo] password for pi:
::: DNS service is running
::: Pi-hole blocking is Enabled
pi@raspberrypi:~ $ sudo service dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
   Active: active (running) since Wed 2017-05-17 22:19:20 BST; 1 day 12h ago
 Main PID: 6941 (dnsmasq)
   CGroup: /system.slice/dnsmasq.service
           └─6941 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.c...
May 17 22:19:19 raspberrypi dnsmasq[6934]: dnsmasq: syntax check OK.
May 17 22:19:20 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server

```

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 3:18pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/9 "2017-05-19T15:18:56Z")

</div>

What is the output of `sudo pihole status web`?  
Also, does `/etc/sudoers.d/pihole` exist?

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 4:09pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/10 "2017-05-19T16:09:51Z")

</div>

Ive run `sudo pihole status web`...

```auto
pi@raspberrypi:~ $ sudo pihole status web
[sudo] password for pi:
1
pi@raspberrypi:~ $

```

And the file `/etc/sudoers.d/pihole` **does** exist.

It contains

```auto
GNU nano 2.2.6 File: /etc/sudoers.d/pihole                                          
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Allows the WebUI to use Pi-hole commands
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
  GNU nano 2.2.6 File: /etc/sudoers.d/pihole                                          
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Allows the WebUI to use Pi-hole commands
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
#
www-data ALL=NOPASSWD: /usr/local/bin/pihole

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell

```

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 5:01pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/11 "2017-05-19T17:01:24Z")

</div>

Does the web interface still say that the status is Unknown?

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 5:04pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/12 "2017-05-19T17:04:56Z")

</div>

Yes it does.

If I click `enable` it switches to active.  
But if I refresh the page, it reverts back to unknown.

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 5:07pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/13 "2017-05-19T17:07:31Z")

</div>

Try restarting the Pi-hole. Make another debug token with `pihole -d`.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 5:49pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/14 "2017-05-19T17:49:48Z")

</div>

Restarted my Pi, still see the same behaviour.

Debug token `qn2wgf8wel`

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 7:34pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/15 "2017-05-19T19:34:25Z")

</div>

What is the output of `sudo service lighttpd status`?

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 7:39pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/16 "2017-05-19T19:39:38Z")

</div>

> [@Mcat12](#):
>
> What is the output of `sudo service lighttpd status`?

```auto
pi@raspberrypi:~ $ sudo service lighttpd status
[sudo] password for pi:
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled)
   Active: active (running) since Fri 2017-05-19 18:42:32 BST; 1h 56min ago
  Process: 701 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 1086 (lighttpd)
   CGroup: /system.slice/lighttpd.service
           ├─1086 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf ├─1270 /usr/bin/php-cgi
           ├─1282 /usr/bin/php-cgi
           ├─1283 /usr/bin/php-cgi
           ├─1284 /usr/bin/php-cgi
           └─1285 /usr/bin/php-cgi

May 19 18:54:54 raspberrypi sudo[2323]: pam_unix(sudo:auth): auth could not identify password f...ata]May 19 18:54:54 raspberrypi lighttpd[1086]: sudo: no tty present and no askpass program specified
May 19 18:55:17 raspberrypi lighttpd[1086]: We trust you have received the usual lecture from th...temMay 19 18:55:17 raspberrypi lighttpd[1086]: Administrator. It usually boils down to these three ...gs:May 19 18:55:17 raspberrypi lighttpd[1086]: #1) Respect the privacy of others.
May 19 18:55:17 raspberrypi lighttpd[1086]: #2) Think before you type.
May 19 18:55:17 raspberrypi lighttpd[1086]: #3) With great power comes great responsibility.
May 19 18:55:17 raspberrypi sudo[2430]: pam_unix(sudo:auth): conversation failed
May 19 18:55:17 raspberrypi sudo[2430]: pam_unix(sudo:auth): auth could not identify password f...ata]May 19 18:55:18 raspberrypi lighttpd[1086]: sudo: no tty present and no askpass program specified
Hint: Some lines were ellipsized, use -l to show in full.

```

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 7:54pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/17 "2017-05-19T19:54:56Z")

</div>

Run the command with the `-l` parameter so we can see the full lines. It looks like lighttpd is unable to use sudo commands, although the sudoers file is installed.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 8:02pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/18 "2017-05-19T20:02:00Z")

</div>

> [@Mcat12](#):
>
> Run the command with the `-l` parameter so we can see the full lines. It looks like lighttpd is unable to use sudo commands, although the sudoers file is installed.

Thank for taking the time to look @Mcat12

```auto
 pi@raspberrypi:~ $ sudo service lighttpd status -l
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled)
   Active: active (running) since Fri 2017-05-19 18:42:32 BST; 2h 17min ago
  Process: 701 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 1086 (lighttpd)
   CGroup: /system.slice/lighttpd.service
           ├─1086 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           ├─1270 /usr/bin/php-cgi
           ├─1282 /usr/bin/php-cgi
           ├─1283 /usr/bin/php-cgi
           ├─1284 /usr/bin/php-cgi
           └─1285 /usr/bin/php-cgi

May 19 18:54:54 raspberrypi sudo[2323]: pam_unix(sudo:auth): auth could not identify password for [www-data]
May 19 18:54:54 raspberrypi lighttpd[1086]: sudo: no tty present and no askpass program specified
May 19 18:55:17 raspberrypi lighttpd[1086]: We trust you have received the usual lecture from the local System
May 19 18:55:17 raspberrypi lighttpd[1086]: Administrator. It usually boils down to these three things:
May 19 18:55:17 raspberrypi lighttpd[1086]: #1) Respect the privacy of others.
May 19 18:55:17 raspberrypi lighttpd[1086]: #2) Think before you type.
May 19 18:55:17 raspberrypi lighttpd[1086]: #3) With great power comes great responsibility.
May 19 18:55:17 raspberrypi sudo[2430]: pam_unix(sudo:auth): conversation failed
May 19 18:55:17 raspberrypi sudo[2430]: pam_unix(sudo:auth): auth could not identify password for [www-data]
May 19 18:55:18 raspberrypi lighttpd[1086]: sudo: no tty present and no askpass program specified

```

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 19, 2017, 9:56pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/19 "2017-05-19T21:56:31Z")

</div>

What is the output of `ls -al /etc/sudoers.d/pihole`? That file should be letting the `www-data` user execute `pihole` commands with `sudo`...

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 19, 2017, 10:03pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/20 "2017-05-19T22:03:15Z")

</div>

> [@Mcat12](#):
>
> What is the output of `ls -al /etc/sudoers.d/pihole`? That file should be letting the `www-data` user execute `pihole` commands with `sudo`...

```auto
pi@raspberrypi:~ $ ls -al /etc/sudoers.d/pihole
-r--r----- 1 root root 367 May 17 22:18 /etc/sudoers.d/pihole

```

[Next page](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219.md?page=2)
