Centos 7.5.1804 PHP error

After a fresh install on CentOS 5.7.1804, attempting to bring up the web interface results in a 500 error

Expected Behaviour:

Web interface should appear

Actual Behaviour:

Browser shows 500 error, lighthttpd log contains:
2018-05-10 19:22:56: (mod_fastcgi.c.434) FastCGI-stderr: PHP Fatal error: Can't use function return value in write context in /var/www/html/pihole/index.php on line 105

Debug Token:

wxfrw87gzf

Can confirm the same error under centos.

my token : 0puvbj1805

This is due to Centos shipping with PHP5 instead of PHP7.

Hey, I have a PR open to address this issue here: CentOS install re-worked to provide PHP7 via Remi Repository by bcambl · Pull Request #2161 · pi-hole/pi-hole · GitHub

In the meantime, you can try the following and then run the installer again:

yum install -y https://rpms.remirepo.net/enterprise/remi-php72-$(rpm -E '%{rhel}').rpm
yum-config-manager --enable remi-php72

Edit: fixed repo url

2 Likes

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