Webinterface broken since upgrade to php8.2

The issue I am facing:
When I log in to the pi-hole webinterface, it is empty (more or less)

I get these errors (and some more of the Function utf8_encode() is deprecated errors) when I navigate the page (query logs, for example):

An unknown error occurred while loading the data.
<br />
<b>Deprecated</b>:  Using ${var} in strings is deprecated, use {$var} instead in <b>/var/www/html/admin/scripts/pi-hole/php/auth.php</b> on line <b>96</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/admin/scripts/pi-hole/php/auth.php:96) in <b>/var/www/html/admin/api_FTL.php</b> on line <b>315</b><br />
{"data":[<br />
<b>Deprecated</b>:  Function utf8_encode() is deprecated in <b>/var/www/html/admin/api_FTL.php</b> on line <b>331</b><br />
<br />

Details about my system:
Debian 12 "Bookworm", updated today. Using PHP8.2 since then. Used Debian 11 "Bullseye" with PHP7.4 before and had no problems with pi-hole then.

What I have changed since installing Pi-hole:
See above.

Please upload a debug log and post just the token URL 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

Here you are:
https://tricorder.pi-hole.net/tDJKi37w/

Thanks for the hint :slight_smile:

This error is not showing up in the debug log, because you are running the Web interface using apache2 and the log only shows lighttpd logs.

Did you previously use Apache when the PHP version was 7.4? or this was recently changed?

No, I'm not running the web interface with apache:

tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN      3266252/lighttpd

It's served by lighttpd on port 81 and I didn't change that.

I do have an apache running, but that doesn't serve pi-hole, never did.

This is todays journal regarding lighttpd:

Dec 27 13:39:53 zem systemd[1]: Stopping Lighttpd Daemon...
Dec 27 13:39:53 zem systemd[1]: lighttpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 27 13:39:53 zem systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Dec 27 13:39:53 zem systemd[1]: Stopped Lighttpd Daemon.
Dec 27 13:39:53 zem systemd[1]: lighttpd.service: Consumed 4.305s CPU time.
Dec 27 13:39:54 zem systemd[1]: Starting Lighttpd Daemon...
Dec 27 13:45:08 zem systemd[1]: Stopping lighttpd.service - Lighttpd Daemon...
Dec 27 13:45:08 zem systemd[1]: lighttpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 27 13:45:08 zem systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Dec 27 13:45:08 zem systemd[1]: Stopped lighttpd.service - Lighttpd Daemon.
Dec 27 13:45:08 zem systemd[1]: Starting lighttpd.service - Lighttpd Daemon...
Dec 27 13:45:08 zem lighttpd[3238620]: 2023-12-27 13:45:08: configfile.c.1142) WARNING: unknown config-key: alias.url (ignored)
Dec 27 13:45:08 zem systemd[1]: Started lighttpd.service - Lighttpd Daemon.
Dec 27 13:46:03 zem sudo[3239492]: www-data : PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole -a -c
Dec 27 13:46:03 zem sudo[3239492]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=33)
Dec 27 13:46:03 zem sudo[3239492]: pam_unix(sudo:session): session closed for user root
Dec 27 13:46:21 zem sudo[3239530]: www-data : PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole -a -c
Dec 27 13:46:21 zem sudo[3239530]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=33)
Dec 27 13:46:21 zem sudo[3239530]: pam_unix(sudo:session): session closed for user root
Dec 27 14:03:18 zem systemd[1]: Stopping lighttpd.service - Lighttpd Daemon...
Dec 27 14:03:18 zem systemd[1]: lighttpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 27 14:03:18 zem systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Dec 27 14:03:18 zem systemd[1]: Stopped lighttpd.service - Lighttpd Daemon.
Dec 27 14:03:18 zem systemd[1]: lighttpd.service: Consumed 3.792s CPU time.
Dec 27 14:03:18 zem systemd[1]: Starting lighttpd.service - Lighttpd Daemon...
Dec 27 14:03:18 zem lighttpd[3266249]: 2023-12-27 14:03:18: (configfile.c.1289) WARNING: unknown config-key: alias.url (ignored)
Dec 27 14:03:18 zem systemd[1]: Started lighttpd.service - Lighttpd Daemon.
Dec 27 17:01:11 zem sudo[3403974]: www-data : PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole -a -c
Dec 27 17:01:11 zem sudo[3403974]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=33)
Dec 27 17:01:11 zem sudo[3403974]: pam_unix(sudo:session): session closed for user root

Not very interesting.... But I double checked that I get lighttpd log entries when I access pi-hole.

After I rebooted the server, I don't get the error messages any more. But the dashboard still looks empty like before. The "Query Logs" tab shows data, but others don't. Very strange.
I created another log after the reboot:
https://tricorder.pi-hole.net/WR39zbto/

php-sqlite3 was missing. Everything's fine after I installed it and restarted lighttpd :slight_smile:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.