From 2ba350984f19165b2f224d4d9d7e9bc3bf655850 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 18 Apr 2021 15:12:01 +0200 Subject: [PATCH] Enable PHP8 support for Debian/Ubuntu Since PHP8.0, the JSON extension is a core PHP extension and hence the php8.0-json package does not exist and is not required: - https://www.php.net/manual/json.installation.php - https://packages.debian.org/php8.0-json Solves: https://discourse.pi-hole.net/t/php-8-packages-not-found/46286 Signed-off-by: MichaIng --- automated install/basic-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index eb52aea3..1d6253a0 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -360,7 +360,11 @@ if is_command apt-get ; then PIHOLE_DEPS=(cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2) # Packages required for the Web admin interface (stored as an array) # It's useful to separate this from Pi-hole, since the two repos are also setup separately - PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-${phpSqlite}" "${phpVer}-xml" "${phpVer}-json" "${phpVer}-intl") + PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-${phpSqlite}" "${phpVer}-xml" "${phpVer}-intl") + # Prior to PHP8.0, JSON functionality is provided as dedicated module, required by Pi-hole AdminLTE: https://www.php.net/manual/json.installation.php + if [[ "${phpInsNewer}" != true || "${phpInsMajor}" -lt 8 ]]; then + PIHOLE_WEB_DEPS+=("${phpVer}-json") + fi # The Web server user, LIGHTTPD_USER="www-data" # group,