How To Install Downloaded Old PHP Version

I have gotten the php-7.0.33.tar.gz file from the PHP site, uploaded it to a server and "wget" it to FreeBSD 13.1 and put it into a created /usr/local/etc/phptmp directory named php7033.tar.gz.

I don't know how to unzip, and where to unzip it to, and then how to install it. Pretty sure I can unzip it, but want to ensure I do it right.

Looking for some guidance please.
 
I have gotten the php-7.0.33.tar.gz file from the PHP site, uploaded it to a server and "wget" it to FreeBSD 13.1
Why didn't you download it directly to your server?
put it into a created /usr/local/etc/phptmp directory named php7033.tar.gz.
Source archives never ever belong to a etc directory. And using the same name for an archive es well es for a directory is a good idea to get confuesed for further steps ;)
I don't know how to unzip, and where to unzip it to, and then how to install it.
As always: Use the docs. From there: "Prerequisite knowledge: Basic Unix skills (being able to operate "make" and a C compiler)"
Your question doesn't let me trust in this, so it might not be a good idea to preceed… Anyway:
wget https://www.php.net/distributions/php-7.0.33.tar.bz2
tar xvfz php-7.0.33.tar.bz2
cd php-7.0.33
./configure

Solve everything that pops up here.
make
su -
cd /to/your/php-7.0.33
make install

PHP 7.0 still compiles fine on an up to date FreeBSD. And: Never ever copy&paste things from the internet without understanding what you're doing! Before using any line here upgrade your knowledge of what that line does.

And of course you won't use PHP 7.0 on a public server, right?
 
Might be easier to check out a git revision of the ports tree that has the required version and install from there.
 
If this is needed for legacy reasons (as sysadmin/ops person, there is always a need to run older versions) - I'd suggest using Jails or VMs. And use an older version of the pkg from the packages/port tree, and possibly older version of FreeBSD.
I'd also suggest building it from the ports collection ... NOT directly from the php.net source.
Generally, are issues that many people have already worked out and patched in the ports, so you don't have too.
 
Back
Top