FreeBSD 11.2 – How to Install PHP 5.3

freebsdfreebsd-portsphp53

I have an old app written in PHP 5.3 that is not to be upgraded and doesn't work with php56 and higher.
I'd like to install PHP 5.3 with most of the extensions on FreeBSD 11.2 box.
And then I'd like to create package(s) I can use on another machine.

Unfortunately PHP 5.3 is not in the ports anymore.
I got older version of ports that consists of PHP 5.3.
There is a problem with compiling that port, have many errors and cannot succeed.

Can somebody show path to compile php 5.3 as a port in FreeBSD 11.2?

Thank you in advance.

Best Answer

The comments to your post outline the fact that this task may be not only tricky to attempt as well as difficult to succeed at, but also likely insecure even if you do manage to succeed.

That said, the canonical way would probably be to download an SVN repo of the ports tree, determine which SVN revision number removed the PHP 5.3 support you seek, and then roll your SVN tree back to a revision just prior to that. You'll then have all the requisite problems of finding out whether the source tarballs are still downloadable, whether the supporting libraries and other APIs present in FreeBSD 11.2 are compatible with what the legacy PHP version expects, etc., etc.