Christopher Weldon wrote:
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.
--
This has come up a few times recently, and I added my own two cents,
which required two separate Apaches installs on the same server, which
I'd done for myself. But this solution is really cool!
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php