How do you enable PHP4 and 5
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
How do you enable PHP4 and 5
Can they run at the same time or do they conflict? How do you set it up so they can run on the same machine, but not at the same time?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: How do you enable PHP4 and 5
I think people who run them simultaneously run one as a CGI. I suppose you could just mod_rewrite to 'cgi-bin/php' instead of 'index.php' and clean URLs would be the same.
(#10850)
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: How do you enable PHP4 and 5
You can run then in the same apache as long as you use shared object and disambiguate them with .php4 and .php5 extensions (or whatever takes your fancy)
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: How do you enable PHP4 and 5
Hmmm...interesting...didn't even think of that one...I think people who run them simultaneously run one as a CGI. I suppose you could just mod_rewrite to 'cgi-bin/php' instead of 'index.php' and clean URLs would be the same.
Same Apache instance...but how do you tell Apache to run PHP4 or PHP5? Requiring the extension would be a PITA...what happens to legacy PHP applications? Do I change their extensions from php4 to php5? It owuld be ideal if I could put php4 applications in a php4 directory and php5 applications in another directory.Ollie Saunders wrote:You can run then in the same apache as long as you use shared object and disambiguate them with .php4 and .php5 extensions (or whatever takes your fancy)
Re: How do you enable PHP4 and 5
One solution to end them all: http://hurring.com/scott/howto/php4_and_php5/
Re: How do you enable PHP4 and 5
You can also do this by placing a .htaccess file in the directory with the line
AddHandler application/x-httpd-php4 .php
obviously substitute php4 for php 5 depending on what you want the scripts in the directory to use.
AddHandler application/x-httpd-php4 .php
obviously substitute php4 for php 5 depending on what you want the scripts in the directory to use.