Hodders
Posts: 1
Joined: Tue Jul 02, 2019 9:17 pm

Need a LAMP server running PHP5.6 on a Pi 4

Tue Jul 02, 2019 9:23 pm

Pi4 turned up today - it's gorgeous.

Needed to set up a lamp server on it to run a legacy website in archive mode. All went smoothly then.....

Website needs php5.6, duster only runs php7

Can't get php5 binaries for pi4, pi4 can't run raspian jessie (which runs php5.6) on the Pi4.

Stuck.

Thinking of getting a Pi 3 which was the last version that runs Jessie just to get php5.6.

Hate it when software stops supporting functions like ereg and msqlconnect just a pain.

Any ideas how I can get Jessie running on a Pi4 or PHP5.6 running on Duster???


User avatar
DougieLawson
Posts: 36105
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Need a LAMP server running PHP5.6 on a Pi 4

Wed Jul 03, 2019 12:43 am

What's stopping you from running your program with PHP 7?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

jerrm
Posts: 194
Joined: Wed May 02, 2018 7:35 pm

Re: Need a LAMP server running PHP5.6 on a Pi 4

Fri Jul 05, 2019 1:56 pm

Hodders wrote:
Tue Jul 02, 2019 9:23 pm
Pi4 turned up today - it's gorgeous.

Needed to set up a lamp server on it to run a legacy website in archive mode. All went smoothly then.....

Website needs php5.6, duster only runs php7

Can't get php5 binaries for pi4, pi4 can't run raspian jessie (which runs php5.6) on the Pi4.

Stuck.

Thinking of getting a Pi 3 which was the last version that runs Jessie just to get php5.6.

Hate it when software stops supporting functions like ereg and msqlconnect just a pain.

Any ideas how I can get Jessie running on a Pi4 or PHP5.6 running on Duster???
https://deb.sury.org has repos for PHP 5.6 and 7.0 that run on Pi Buster. The guy is one of the primary maintainers of PHP on Debian, so it's about as good as you can get for for a non-distro source. Still - it is an individual "3rd Party," so could disappear tomorrow if he decides to abandon the project, takes ill, etc. My hedge is to archive anything I use from such sources.

To install php5.6, first add the repo to your apt sources:

Code: Select all

wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ buster main" | sudo tee /etc/apt/sources.list.d/php.list

Then apt-get specifically "php5.6" instead of "php" for any packages you may need, ie: instead of "apt-get install php php-url php-cli php-pdo php-mysql ..." use "apt-get install php5.6 php5.6-curl php5.6-cli php5.6-pdo php5.6-mysql ..." It may take a little trial and error. Not all php packages are version specific, so may not need the "5.6" added.
Last edited by jerrm on Fri Jul 05, 2019 2:09 pm, edited 1 time in total.

jerrm
Posts: 194
Joined: Wed May 02, 2018 7:35 pm

Re: Need a LAMP server running PHP5.6 on a Pi 4

Fri Jul 05, 2019 2:06 pm

DougieLawson wrote:
Wed Jul 03, 2019 12:43 am
What's stopping you from running your program with PHP 7?
The PHP devs break things between versions. Some of the changes I can understand and agree with, some seem rather arbitrary, some are just dumb.

If not a dev, using a product that hasn't been updated from PHP 5 to PHP 7 (or even from 7.0 to 7.3) is a daunting task.

Even though competent to make most any changes necessary to run under a newer version, I don't want to maintain my own fork of projects.

Return to “Advanced users”