Help - Search - Members - Calendar
Full Version: Php 4 & 5 together on RHEL 4/w Apache 1.3x?
The Planet Forums > System Administration > HOWTOs
Kelly K
We were looking for recomendations on how to best go about running both PHP 4 & 5 with apache 1.3x on RHEL 4.
Ive seenn a couple of posts about configuring Apache, ect, but wonder if there are there any inherent problems in doing this?

We have some legacy php 4 apps(that do not run properly under php5) that still have to run, but we have a new php app that requires php5.

We are also looking for a recomendation on how to compile and install php5 on this server without disturbing the existing php4 enviornment.

Thanks in advance for any help.
AdamS
QUOTE (Kelly K @ Jan 30 2009, 10:00 PM) *
We were looking for recomendations on how to best go about running both PHP 4 & 5 with apache 1.3x on RHEL 4.
Ive seenn a couple of posts about configuring Apache, ect, but wonder if there are there any inherent problems in doing this?

We have some legacy php 4 apps(that do not run properly under php5) that still have to run, but we have a new php app that requires php5.

We are also looking for a recomendation on how to compile and install php5 on this server without disturbing the existing php4 enviornment.

Thanks in advance for any help.


See my how-to here. Just ignore the ensim specific stuff. Should shed some light on what you're trying to do. PHP 4 is reaching end of life, version 5 has been out for years. Why not upgrade and use php4 for only sites really needing it? I don't understand why everyone is not using it these days. It's not hard to convert a script over for computability.

Anyways, see this post: http://forums.theplanet.com/index.php?showtopic=89733

Use my patched version of suPHP or you may not get the desired result, also suPHP should compile with apache v1. Everything can be found in my thread. Make sure you have the apache dev libs and headers. (httpd-devel) package. icon_wink.gif

Add this in the virtual host container in the httpd conf:

CODE
suPHP_Engine on
suPHP_UserGroup GROUPNAME USERNAME
AddHandler x-httpd-php4 .php4
suPHP_AddHandler x-httpd-php4


Replacing groupname and username with the php file owners.

Just build php5 from source and replace 4 with 5 in my howto. Have php 5 execute by .php5 files.

Questions? Feel free to ask
Catalyst
There's also a widespread warning that PHP5 isn't exceptionally brilliant under Apache 1.3 --- it nearly requires Apache 2.0 at a minimum to work efficiently.
AdamS
QUOTE (Catalyst @ Feb 11 2009, 05:15 PM) *
There's also a widespread warning that PHP5 isn't exceptionally brilliant under Apache 1.3 --- it nearly requires Apache 2.0 at a minimum to work efficiently.


Interesting, did not see that one. Using apache 2 since before my PHP upgrade. Good info!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.