Re: [PHP] PHP4 to PHP5 issue
- From: cweldon@xxxxxxxxxxxxxxxxxx (Christopher Weldon)
- Date: Wed, 7 Feb 2007 09:42:48 -0600
On Feb 5, 2007, at 2:00 PM, Jochem Maas wrote:
you don't need to use the box - you can install a 2nd copy of apache and
run php4 on it and use the apache ProxyPass directive to make the php4/apache
setup available via the apache(2)/php5 [std] webserver.
search the archives for 'ProxyPass'
You actually don't even have to run a second instance of Apache. From what I've heard of other hosting companies doing, you can use the same Apache installation and run PHP4 and PHP5 concurrently.
However, the only thing you'd have to do is one of the following:
1) For PHP4 apps and scripts, leave the .php extension and rename all PHP5 apps and scripts with a .php5 extension. Where you have the string:
DirectoryIndex index.php index.html
add: index.php5 to it. And where you have the string:
AddType application/x-httpd-php .php
Change it to:
AddType application/x-httpd-php4 .php
Also, add another line:
AddType application/x-httpd-php5 .php5
Make sure you include both the php4 and php5 modules, restart apache and voila! PHP4 and PHP5 on the same server using 1 installation of Apache.
2) Do the same as above, but use .php4 extensions instead of .php5.
3) Additionally, after doing 5 minutes of Googling, I found that you can have .htaccess files to control which applications use PHP4 and which use PHP5 with the following directive:
AddHandler application/x-httpd-php5 .php
This would circumvent having to rename the extensions of your PHP files, as you could then do directory specific PHP4/5 app running. You still have to make certain Apache has both the PHP4 and PHP5 modules loaded, obviously.
--
Christopher Weldon
President & CEO
Cerberus Interactive, Inc.
cweldon@xxxxxxxxxxxxxxxxxx
(866) 813-4603 x605
.
- Follow-Ups:
- Re: [PHP] PHP4 to PHP5 issue
- From: Myron Turner
- Re: [PHP] PHP4 to PHP5 issue
- References:
- RE: [PHP] PHP4 to PHP5 issue
- From: "Tim"
- Re: [PHP] PHP4 to PHP5 issue
- From: Skip Evans
- Re: [PHP] PHP4 to PHP5 issue
- From: Jochem Maas
- RE: [PHP] PHP4 to PHP5 issue
- Prev by Date: Re: [PHP] Opera advice needed!
- Next by Date: Re: [PHP] JS prompt -> php
- Previous by thread: RE: [PHP] PHP4 to PHP5 issue
- Next by thread: Re: [PHP] PHP4 to PHP5 issue
- Index(es):
Relevant Pages
|