Ubuntu – Installing php4 on ubuntu 11.04

apache-2.2PHPUbuntuubuntu-11.04

I need to install php4 to run a specific module that is no longer compatible with php5. I'm running ubuntu server 11.04 64bit. And as I expected the php4 packages are no longer available. Does anyone have a source for installing php4?

PS. Before anyone posts saying php5 is better "BLAH BLAH BLAH" I need php4 for a very specific reason and comments explaining the reasons why I should be using php5 over php4 are not helpful.

Best Answer

Just compile the source from the php site, you don need special ubuntu source code. I have literally just done it on a Ubuntu 11.04 VPS to check it was that easy. I had to install one extr package "flex"

wget http://uk.php.net/distributions/php-4.4.9.tar.gz
tar zxf php-4.4.9.tar.gz
cd php-4.4.9/
./configure
make
sudo make install

I didnt make the apache module, I haven't looked into that. It was a 32bit VPS I cant imagine it would not be as easy on 64bit.