PHP 4 - Linux Red Hat Enterprise 5

Hi All,
I installed Red Hat Enterprise 5 for our webserver.
I need to install PHP version 4 for our web server as it does not support version 5.
Where do i get PHP 4 supported by Red Hat Enterprise 5?

Thank you
c00kie88Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jccs0519Connect With a Mentor Commented:
Yea, you should be able to recompile from sources.

http://www.php.net/manual/en/install.unix.apache2.php

I'm running RedHat 8, RedHat Enterprise Linux 3 and I have both php4 and php5 version running before.
0
 
lavinpj1Commented:
PHP4 is EOL and should not be used. Why does the server not support PHP5, surely it can be compiled from source?

Phil
0
 
c00kie88Author Commented:
Hi all,

Just spoken to the web developer, apparently it's not possible to convert our coding to be compatible to PHP 5 as a lot of work will be required.
Is there any PHP 4 rpm that i can find that compatible with Red Hat Enterprise 5?
0
 
jccs0519Commented:
You probably won't find any php4 rpm for RHEL5, but if you have support contract w/ Redhat you might ask them to see if they have it.  If not, then just get the php4 sources from php.net and follow this link http://www.php.net/manual/en/install.unix.apache2.php

to compile from sources.  The instruction is for php5, but php4 is pretty similar as I remember.

Depending on the how the RHEL5 pre-installed apache2 is configured, you may need to install a new version of apache in /usr/local/apache2.  May seems hard, but if you follow the instruction, it's not bad.   Here is very simplified instruction but should give you a guideline.

1. Download Apache2 (may need Apache 1, depending on the php4 requirement)
2. Unpack and configue, make, install
3. Download php4 (http://us3.php.net/get/php-4.4.9.tar.gz/from/a/mirror)
4. Unpack and configure,make, install based on the apache installation you just compiled
5. Disable stocked apache server on RHEL5
6. Start apache in /usr/local/apache2 then move your site to the new apache location, then you're done.

Another wild idea is run whatever server version you have on top of RHEL5 inside a virtualization.  If your server is powerful enough, you probably won't suffer much in performance, even if you suffer a little performance hit, but you gain in compatibility of your php codes.  You can use VirtualBox, it's free.

That being said, I'm pretty sure you can compile php4 on RHEL5.  Google and found this: http://blog.stuartherbert.com/php/2007/04/04/getting-php-4-running-on-redhat-enterprise-linux-5/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.