You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Lopez, Denise" <dl...@humnet.ucla.edu> on 2009/02/21 01:12:25 UTC

[users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Hi all,

I was wondering if anyone has successfully installed php4 and php5 both
as Apache modules on RedHat Linux before.  My situation is that I have
legacy authentication code that requires php4.  Sorry, not required, I
just don't have the time to try to figure out how to modify the scripts
to run under php5.  

In addition we are moving to a new authentication method that requires
PHP5. I would like to have the sites that run with the older version of
php4 and the scripts that run with the newer version of php5 installed
on the same server so the developers can move over authenticated
applications as necessary.

I currently have php5 installed as a module and php4 installed as a cgi
binary but there is heavy use of the $_SESSION variables in the scripts
and it does not function when php4 is configured as a cgi binary. I keep
getting an undefined index error in the apache log that refers to a
$_SESSION variable declared in one of the scripts.   

My thought is it would be possible to have 2 virtual named hosts and one
run php4 as a module and the other php5 as a module.

Any input or point in the right direction would be appreciated.
Thanks 

Denise Lopez
UCLA - Center for Digital Humanities
Network Services
Linux Systems Engineer
337 Charles E. Young Drive East
PPB 1020
Los Angeles, CA 90095-1499
310/206-8216
 <<Picture (Device Independent Bitmap)>> 



RE: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Posted by "Lopez, Denise" <dl...@humnet.ucla.edu>.
Thanks. 
I will give that a try.

Denise Lopez
310/ 206-8216
dlopez@humnet.ucla.edu


-----Original Message-----
From: Anthony J. Biacco [mailto:abiacco@formatdynamics.com] 
Sent: Friday, February 20, 2009 4:41 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Try running the php4 version as a fastcgi with the mod_fastcgi module, that's what we do. Configure php4 with -enable-fastcgi and --enable-force-cgi-redirect

-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abiacco@formatdynamics.com
http://www.formatdynamics.com

From: Lopez, Denise [mailto:dlopez@humnet.ucla.edu] 
Sent: Friday, February 20, 2009 5:12 PM
To: users@httpd.apache.org
Subject: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Hi all,
I was wondering if anyone has successfully installed php4 and php5 both as Apache modules on RedHat Linux before.  My situation is that I have legacy authentication code that requires php4.  Sorry, not required, I just don't have the time to try to figure out how to modify the scripts to run under php5.  
In addition we are moving to a new authentication method that requires PHP5. I would like to have the sites that run with the older version of php4 and the scripts that run with the newer version of php5 installed on the same server so the developers can move over authenticated applications as necessary.
I currently have php5 installed as a module and php4 installed as a cgi binary but there is heavy use of the $_SESSION variables in the scripts and it does not function when php4 is configured as a cgi binary. I keep getting an undefined index error in the apache log that refers to a $_SESSION variable declared in one of the scripts.   
My thought is it would be possible to have 2 virtual named hosts and one run php4 as a module and the other php5 as a module.
Any input or point in the right direction would be appreciated.
Thanks 
Denise Lopez
UCLA - Center for Digital Humanities
Network Services
Linux Systems Engineer
337 Charles E. Young Drive East
PPB 1020
Los Angeles, CA 90095-1499
310/206-8216


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Posted by "Anthony J. Biacco" <ab...@formatdynamics.com>.
Try running the php4 version as a fastcgi with the mod_fastcgi module, that's what we do. Configure php4 with -enable-fastcgi and --enable-force-cgi-redirect

-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abiacco@formatdynamics.com
http://www.formatdynamics.com

From: Lopez, Denise [mailto:dlopez@humnet.ucla.edu] 
Sent: Friday, February 20, 2009 5:12 PM
To: users@httpd.apache.org
Subject: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Hi all,
I was wondering if anyone has successfully installed php4 and php5 both as Apache modules on RedHat Linux before.  My situation is that I have legacy authentication code that requires php4.  Sorry, not required, I just don't have the time to try to figure out how to modify the scripts to run under php5.  
In addition we are moving to a new authentication method that requires PHP5. I would like to have the sites that run with the older version of php4 and the scripts that run with the newer version of php5 installed on the same server so the developers can move over authenticated applications as necessary.
I currently have php5 installed as a module and php4 installed as a cgi binary but there is heavy use of the $_SESSION variables in the scripts and it does not function when php4 is configured as a cgi binary. I keep getting an undefined index error in the apache log that refers to a $_SESSION variable declared in one of the scripts.   
My thought is it would be possible to have 2 virtual named hosts and one run php4 as a module and the other php5 as a module.
Any input or point in the right direction would be appreciated.
Thanks 
Denise Lopez
UCLA - Center for Digital Humanities
Network Services
Linux Systems Engineer
337 Charles E. Young Drive East
PPB 1020
Los Angeles, CA 90095-1499
310/206-8216


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Frank Gingras wrote:
> Denise,
> 
> You cannot run mod_php (v4) and mod_php (v5) simultaneously in the same 
> httpd instance.
> 
> You're gonna have to run separate instances of httpd, and run a reverse 
> proxy in front of them.

A simple alternative is to not load the modules, but to run one or both
under mod_fcgid.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP4/PHP5 both as Apache 2 Modules RHEL 5

Posted by Frank Gingras <fr...@gmail.com>.
Denise,

You cannot run mod_php (v4) and mod_php (v5) simultaneously in the same 
httpd instance.

You're gonna have to run separate instances of httpd, and run a reverse 
proxy in front of them.

Frank.

Lopez, Denise wrote:
> Hi all,
>
> I was wondering if anyone has successfully installed php4 and php5 both
> as Apache modules on RedHat Linux before.  My situation is that I have
> legacy authentication code that requires php4.  Sorry, not required, I
> just don't have the time to try to figure out how to modify the scripts
> to run under php5.  
>
> In addition we are moving to a new authentication method that requires
> PHP5. I would like to have the sites that run with the older version of
> php4 and the scripts that run with the newer version of php5 installed
> on the same server so the developers can move over authenticated
> applications as necessary.
>
> I currently have php5 installed as a module and php4 installed as a cgi
> binary but there is heavy use of the $_SESSION variables in the scripts
> and it does not function when php4 is configured as a cgi binary. I keep
> getting an undefined index error in the apache log that refers to a
> $_SESSION variable declared in one of the scripts.   
>
> My thought is it would be possible to have 2 virtual named hosts and one
> run php4 as a module and the other php5 as a module.
>
> Any input or point in the right direction would be appreciated.
> Thanks 
>
> Denise Lopez
> UCLA - Center for Digital Humanities
> Network Services
> Linux Systems Engineer
> 337 Charles E. Young Drive East
> PPB 1020
> Los Angeles, CA 90095-1499
> 310/206-8216
>  <<Picture (Device Independent Bitmap)>> 
>
>
>
>   


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org