# Webinterface broken since upgrade to php8.2

**URL:** <https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206>\
**Category:** Community Help\
**Created:** [December 27, 2023, 4:29pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206 "2023-12-27T16:29:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGrue](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@TheGrue](https://discourse.pi-hole.net/u/TheGrue)\
**Post date:** [December 27, 2023, 4:29pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/1 "2023-12-27T16:29:09Z")

</div>

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

 ![grafik](https://discourse.pi-hole.net/uploads/default/original/3X/e/f/ef739360b142b87272006514c2c2889cbe7016da.png)

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [December 27, 2023, 4:44pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/2 "2023-12-27T16:44:59Z")

</div>

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:

```auto
pihole -d

```

or do it through the Web interface:

_ **Tools \> Generate Debug Log** _

---

<div class="post-metadata">

**Author:** ![TheGrue](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@TheGrue](https://discourse.pi-hole.net/u/TheGrue)\
**Post date:** [December 27, 2023, 6:45pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/3 "2023-12-27T18:45:08Z")

</div>

Here you are:  
[https://tricorder.pi-hole.net/tDJKi37w/](https://tricorder.pi-hole.net/tDJKi37w/)

Thanks for the hint 🙂

---

<div class="post-metadata">

**Author:** ![rdwebdesign](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rdwebdesign/32/51363_2.png) [@rdwebdesign](https://discourse.pi-hole.net/u/rdwebdesign)\
**Post date:** [December 27, 2023, 7:12pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/4 "2023-12-27T19:12:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TheGrue](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@TheGrue](https://discourse.pi-hole.net/u/TheGrue)\
**Post date:** [December 27, 2023, 7:39pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/6 "2023-12-27T19:39:42Z")

</div>

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

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![TheGrue](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@TheGrue](https://discourse.pi-hole.net/u/TheGrue)\
**Post date:** [December 28, 2023, 12:40pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/7 "2023-12-28T12:40:57Z")

</div>

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/](https://tricorder.pi-hole.net/WR39zbto/)

---

<div class="post-metadata">

**Author:** ![TheGrue](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@TheGrue](https://discourse.pi-hole.net/u/TheGrue)\
**Post date:** [December 28, 2023, 12:46pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/8 "2023-12-28T12:46:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [January 18, 2024, 7:44pm UTC](https://discourse.pi-hole.net/t/webinterface-broken-since-upgrade-to-php8-2/67206/10 "2024-01-18T19:44:35Z")

</div>

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