Upgrade PHP5 to PHP7 on Raspbian Jessie 8.0


after I updated to PHP7 on a Raspbian Jessie installation with some trouble I want to share my experience on that workflow. My Server runs NC12.0.4 and a MySQL DB.

First of all I wanted to follow this thread to install.

But for Raspbian the DotDeb repository didn’t work. :frowning:

After doing some search it was clear why. DotDeb offers only x86 and x86-64 architectures packages and not ARM. So I found this side with good infos on raspbian php7 install and the hint to Matis repository

What I have done to succeed was following:

Add the new repository for jessie in an extra file in /etc/apt/sources.list.d named mati75.list

deb http://repozytorium.mati75.eu/raspbian jessie main contrib non-free
#deb-src http://repozytorium.mati75.eu/raspbian jessie main contrib non-free

Add the keys for the repository

gpg --keyserver pgpkeys.mit.edu --recv-key CCD91D6111A06851
gpg --armor --export CCD91D6111A06851 | apt-key add -

Run APT Update

apt-get update

Install PHP7

apt-get install php7.0 php7.0-opcache php7.0-apcu  php7.0-curl php7.0-gd php7.0-mcrypt php7.0-mysql php7.0-mbstring php7.0-phpdbg

Disable PHP5 and enable PHP7

 a2dismod php5
 a2enmod php7.0
 service apache2 restart

Hope this helps other to do the upgrade to PHP7.

1 Like

There is also Raspbian Stretch 9.0 which should already ship php 7.0.