Tools - network errors in beta

  • Pi-hole vDev (release/v5.4, v5.3.1-68-g9ae6b408)
  • Web Interface vDev (release/v5.6, v5.5-49-g16f6a49)
  • FTL vDev (release/v5.9, vDev-1b4fdd4)

selecting tools - network produces a popup - an unknown error occurred while loading the data

Error present on both my piholes.

/var/log/lighttpd/error.log has

> 2021-07-31 14:37:43: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Cannot redeclare getQueryTypeStr() (previously declared in /var/www/html/admin/scripts/pi-hole/php/func.php:483) in /var/www/html/admin/scripts/pi-hole/php/func.php on line 483
> 2021-07-31 14:37:43: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Cannot redeclare getQueryTypeStr() (previously declared in /var/www/html/admin/scripts/pi-hole/php/func.php:483) in /var/www/html/admin/scripts/pi-hole/php/func.php on line 483
> 2021-07-31 14:37:48: (mod_fastcgi.c.421) FastCGI-stderr: PHP Fatal error:  Cannot redeclare getQueryTypeStr() (previously declared in /var/www/html/admin/scripts/pi-hole/php/func.php:483) in /var/www/html/admin/scripts/pi-hole/php/func.php on line 483

Please upload a debug log and post just the token that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

I believe this commit: Move validation functions into func.php and use the same validation iā€¦ is the culprit. Line 14 was added to api_db.php: require("scripts/pi-hole/php/func.php");, which is already include via the line above: require("scripts/pi-hole/php/auth.php");

Commenting out line 14 allows the Network tool to operate again.

1 Like

Do you want to open a PR to fix that or should we handle it?

I'm happy to have you guys handle on the next update. I don't use the Network function, myself. I was just poking around. While I wouldn't expect removing that line would cause any side effects, I would prefer if someone more familiar confirmed my assumption.

https://tricorder.pi-hole.net/9us2pisjio

Can I add to my list of woes

Tools - pi-hole diagnosis gives a popup

DataTables warning: table id=messagesTable - Ajax error. For more information about this error, please see 7. Warning: Ajax error

Both errors should be fixed by

Thanks @tomporter518 who tracked the bug and proposed a solution.

1 Like
  • Pi-hole vDev (release/v5.4, v5.3.1-68-g9ae6b408)
  • Web Interface vDev (release/v5.6, v5.5-51-g3140bb5)
  • FTL vDev (release/v5.9, vDev-1b4fdd4)

Thanks, both issues fixed.