Forum Moderators: phranque

Message Too Old, No Replies

Running one server with both PHP4 and PHP5

Possible with VirtualHost?

         

chrisjoha

6:43 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



I'm going to need a server that can run both PHP4 and PHP5 in CLI mode. Is it possible to achieve this effect with <VirtualHost>?

On my local server I use if-def to start the server with the php version of my choice. But I would like to have both running in one instance and make the url decide which version should be used. Is this possible?

jatar_k

6:04 am on Jul 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if I remember correctly this does lots of bad things, if it runs at all

you can run the two seperately but not together

why do you require this?

chrisjoha

6:29 am on Jul 21, 2005 (gmt 0)

10+ Year Member



I require it because I'm writing an application that takes full use of PHP5's OOP and also require it's performance improvement. At the same time my company runs eZ publish sites which requires PHP4 (for now anyway). Two servers is not an option at the moment.

Could I run two Apache instances on the same machine on different ports perhaps? ie. 111.000.000.111:80 (php4) 111.000.000.111:81 (php5)?

coopster

1:28 pm on Jul 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have run two instances (actually Apache 1.3 and Apache 2) on the same box, same port, but different subdomains. It can be done, just be careful with your configuration.

I know that there are some articles out there describing how to setup PHP4 and PHP5 on the same box. A certain blog run by Harry Fuecks teaches how "Running PHP4 and PHP5 in parallel" can be accomplished. John Coggeshall is one of the contributors. Search on Google and you'll find it.