BrewPi/brewpi-tools

PHP5 issues with Raspian Stretch

Opened this issue · 5 comments

As a total noob with Raspian Pi I'm having 'fun' with the brew pi install - the issue being that it appears the new version of Raspain Stretch has been 'upgraded' to PHP7, removing all PHP5 code, so the brew pi tools install fails. It seems there are some workarounds for the OS, although I'm still working on persuading them to work... Meanwhile is there any likelyhood of the brewpi tools being upgraded to use PHP7?

this is the line in the install that causes the issue :
sudo apt-get install -y apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi php5

none of libapache2-mod-php5 php5-cli php5-common php5-cgi php5 are included in the Raspian Stretch

https://packages.debian.org/stretch/php/ lists all the php packages.

I edited the line containing "libapache2-mod-php5 php5-cli php5-common php5-cgi php5 " to
"libapache2-mod-php php-cli php-common php-cgi php"

So far, so good - at least the install is continuing anyway!

Having the same issue. I hate to use php5 as it is getting old, but using 7 and I got a blank screen. Answer here suggests adding jessie to the sources list

I can't recall if I tried 7 or not, however with it updated as above, and with Raspain Stretch as the OS, BrewPi has been running absolutely flawlessly.

I loaded the jessie repository and sourced php5. We'll see how it goes.

I edited the line containing "libapache2-mod-php5 php5-cli php5-common php5-cgi php5 " to
"libapache2-mod-php php-cli php-common php-cgi php"

This got me most of the way there, however like @uSlackr I was getting a HTTP 500 error from the server, after checking the apache error logs php was dying because of:

PHP Fatal error:  Uncaught Error: Call to undefined function mb_convert_encoding()

I installed it then restarted apache, and it the server appears to be working.

sudo apt-get install php7.0-mbstring
sudo service apache restart