Installing php4 alongside php5
Does anyone have any experience of installing php4 alongside php5 and then switching between the two on a per site basis?
I've seen it done on shared hosting but not sure where to start on my own server.
I've already got php5 installed but I'm concerned that if I can stumbling in and blindly install php4 it'll somehow overwrite 5.
Any pointers would be much appreciated.
Most distros don't even ship PHP4 these days, because PHP4 hasn't received security update in over two years. You may have to hunt down the 4.4.9 source code and compile it yourself.
The web hosts that still support PHP4 do so at their own risk. Actually, if I were choosing a web host, I'd avoid the ones that even mentioned PHP4 because it's a time bomb just waiting to blow up.
Thanks for the reply.
I'm running Ubuntu but to be honest, I've decided it's not worth the effort!
I have done it on a lot of servers, I installed PHP5 using packages but installed PHP4 using source code. I then setup apache using a proxy so port 80 went to PHP5 and port 81 went to a different apache instance that ran PHP4.
You then setup the v-hosts so that the sites you want to run PHP4 are redirected using the proxy to the PHP4 instance on port 81.
Its messy, but it did work well. Problems were logging, updates etc…
We have now dropped to PHP5 across the board
Hope it gives you some ideas