-
-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error undefined index when saving PiHole settings screen for custom DNS upstream servers #1754
Comments
This is the actual error that needs to get fixed:
Some notes to help later readers as I took a quick look at the source of the problem:
I noticed that the
UI The error HTML Element: <div id="alError" class="alert alert-danger alert-dismissible fade in" role="alert">
<button type="button" class="close" data-hide="alert" aria-label="Close"><span aria-hidden="true">×</span>
</button>
<h4><i class="icon fa fa-ban"></i> Error</h4>
There was a problem applying your settings.<br>Debugging information:<br>PHP error (2): Undefined array key "v6_2" in /var/www/html/admin/scripts/pi-hole/php/savesettings.php:276 </div> |
I have Pi-hole v5.5, FTL v5.10.2, Web Interface v5.7 and when I try to change an Upstream DNS server, I also the same error. |
This is a php8.0 issue (and it's still valid) |
@DenyDarko please read the first paragraph of my last comment. It's independent of the PHP version as it's root is in how error suppression works (and does not work) in PHP. |
Hey Franz! I really don't have deep knowledge in how PHP suppression works. I just commenting on what I saw. In 7.3 the error doesn't show up (while it's still there I assume), when 8.0.11 is installed, the error pop up on the screen. |
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/finding-pi-hole-ip-addresses-after-v5-4-update/49712/61 |
Happens whenever hitting |
@bcutter adjusted. |
Any luck with finding a solution to fix this? I am running an Ubuntu server VM on my Unraid box and this the error code it is throwing me. I even made a brand new VM and still the same. Any ideas? |
Sorry this has slipped though so long. It really looks to be an issue with PHP 8 as mentioned by a few of you before. I wasn't able to reproduce this on my development system (PHP 7.4.3) even when removing the error suppression ( Please try
if your not using a Docker container. In case you are all using Docker, I could also generate a custom Docker container. |
Awesome worked ... the pihole checkout web fix was able to fix the issue and save the custom DNS entry. You guys wrote an amazing piece of software and I can speak for the masses when I say Thank You... |
this fixes DNS setting save error. shown on the bottom page:
to fix this, i did: |
update:
this fixes both issues
|
Fix released with |
Versions
# pihole -v Pi-hole version is v5.2.4 (Latest: v5.2.4) AdminLTE version is v5.4 (Latest: v5.4) FTL version is v5.7 (Latest: v5.7)
Platform
# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal
# php -v PHP 7.4.15 (cli) (built: Feb 23 2021 15:12:26) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.15, Copyright (c), by Zend Technologies
Expected behavior
When adding custom Upstream DNS Servers (one IPv4 and one IPv6 address), the addresses get saved without an error.
Actual behavior / bug
When saving the Upstream DNS Servers with only one IPv4 address
127.0.0.1#53000
in theCustom 1 (IPv4)
field and one IPv6 address::1#53000
in theCustom 3 (IPv6)
field, an error message gets rendered in a red box above the settings.Steps to reproduce
Steps to reproduce the behavior:
Note: Everything is set up using the GUI. The
setupVars.conf
does not have anyPIHOLE_DNS_${i}
entries. Thesettings.php
data loading is not applied./etc/pihole/dns-servers.conf
).Screenshots
Additional context
I want to set up a local DNS cache, hence the custom DNS Upstream servers. The Cache itself then delegates further. PiHole does not need to know more than the local host IP addresses, for both IPv6 and IPv4, and the port.
The text was updated successfully, but these errors were encountered: