1

I have Ubuntu 15 LTS. Unfortunately, I need to install libapache2-mod-php4 to support old client website. I've managed to install php4 manually, from sources, but I can't find a way to install that package to my Ubuntu. What can I do?

oerdnj
  • 7,940
pwas
  • 123

1 Answers1

6

No job and no customer is worth running PHP 4 unless they pay you a huge amount of money as running PHP 4 imposes a great security risk and in that case you won't be asking here.

Isolate PHP 4 installation as much as you can and put it in the separate segment of the network preferably behind some web proxy where you can sanitize the requests coming from network for a common vulnerabilities (nginx, varnish, etc.).

You should also make sure that the running PHP code has as few permissions as possible. Have different user for owner of the .php files and different web users and tighten the write permissions as much as possible, making sure that the files in the writeable locations cannot be executed (either by shell or with PHP).

The machine running PHP 4 will be successfully attacked or it already has been if it's not firewalled from general public.

I am sorry to say, but nobody in their right mind will provide PHP 4 packages as PHP 4 has been EOLed 7 years, 8 months ago: https://secure.php.net/eol.php, so I am afraid running from sources is your only option.

So if you are asking what you can do, I would definitely recommend you finding a better job where they will not force you run outdated software :).

oerdnj
  • 7,940
  • Thank you @oerdnj for your clearness, in fact I should really consider your last sentence :)

    I ended up in a migration to PHP5.4 ..with some pain..

    – linuxatico May 02 '16 at 16:15
  • 1
    I have acrificed a month to update website sucessfully to php5 (despite my boss decision) and now it works flawlessy. Thanks for clarification! – pwas May 02 '16 at 18:28
  • 1
    You can refer your bosses to this post next time and said that the guy who makes PHP packages said this ;) – oerdnj May 02 '16 at 18:32
  • @linuxatico PHP5.4 is also EOL, see https://secure.php.net/eol.php. Use PHP 5.5 or higher. – QwertyChouskie May 05 '16 at 02:08
  • PHP 5.5 will come to the end this summer, so I would recommend upgrading to have the your code compatible with PHP 5.6 straight away. – oerdnj May 05 '16 at 04:17