503 Service Unavailable - PHP Syntax Error

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Pi-hole web interface access

Actual Behaviour:

503 Service Unavailable
Looked through the forums and found a few that looked like they were close to my issue, but none of the commands fixed the issue. Tried uninstalling and re-installing PHP but keep getting a syntax error in unknown on line 5. Not a big linux / unix user so commands are a mystery to me. Just trying to get my Pi-hole back online so I can block adds and so I have a DNS server running.

Debug Token:

https://tricorder.pi-hole.net/lxCk0iOl/

This seems to be a Operating System level issue.

PHP is not correctly installed in your system:

*** [ DIAGNOSING ]: php version
[✗] php version could not be detected.

This seems to be the same issue from this other topic: 503 Error

Please, try to reinstall PHP using this command:
(Alternatively, you can change the 7.4 version with the same version you had before)

sudo apt install --reinstall php7.4-cgi php7.4-cli php7.4-common php7.4-intl php7.4-json php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml

Thanks for the assistance. However, when trying to install/re-install PHP, I get an error:

sudo apt install --reinstall php7.4-cgi php7.4-cli php7.4-common php7.4-intl php7.4-json php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 9 reinstalled, 0 to remove and 10 not upgraded.
Need to get 0 B/4,004 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Sub-process /usr/bin/dpkg received a segmentation fault.

Further assistance would be appreciated. Not sure if it's something deeper or that my SD card may be corrupt?
Thanks!

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