linux - Can't install old version of php
I need to install an old version of php, because I have a website which is based on that version and won't run with the current one. I know that this should not be done, but it will only be online while updating everything.
I followed this guide: http://mstd.eu/index.php/2016/07/04/install-old-versions-of-software-on-debian-like-php-5-3/ but when calling phpinfo(), I get: Version 5.6.24-0+deb8u1.
I also tried to install php via tarball, which worked, but I won't get it to run with apache...
What can I do to achieve that?
Edit: dpkg --list shows me, that I have the following installed:
php5 5.3.10-2 php5-cli 5.6.24+dfsg- php5-common 5.6.25+dfsg- php5-json 1.3.6-1 php5-readline 5.6.24+dfsg
So here's the issue in the How To you read: it does not outline every package in the specific version it is actually required. So it (probably) installed the correct PHP version, but not the correct cli version and for sure not the correct apache mod.
I managed to build an apt-get command that installs the correct apache and php version. So with that you have a basic installation (with not that many extensions and stuff) you can go ahead with:
How i got there
I want to outline here how i got there for documenation purpose:
I basically startet with the
php5-clipackage and the run into a lot of apt-get issues that looks like that:
The easiest way is then to run a
madisonto list the available versions and choose the right one (which in your case will probably always be the oldest one):
And just to mention it, this is Apache 2.2 going to be installed. I have no idea how supported that still is, but I am sure that PHP 5.3 is way to old. You might expose yourself to quite a huge security issue.