Portal Home > Knowledgebase > Articles Database > Can we run both PHP4 and PHP5 together?

Can we run both PHP4 and PHP5 together?

Posted by sallyanne, 07-27-2008, 04:39 AM
We have a client which site requires PHP4, not PHP5 to run. Can we run both PHP versions alongside each other? Apparently, their site will only work in PHP4. Any advice appreciated. We are running Plesk 8.3.0 for Linux.

Posted by ServermanWebhosting, 07-27-2008, 04:49 AM
It is possible to run both. You need to do a custom compile and than you should be able to switch with the vhost entries. You will find several howtos in the wild.

Posted by sallyanne, 07-27-2008, 05:51 AM
If anyone knows how to specifically do this with Plesk, I'd appreciate any info.

Posted by stephanhughson, 07-27-2008, 09:00 AM
To be honest, even if it is possible, I wouldn't do it. PHP 4 is on its way out, the customer needs to move forward, I don't think you should be going out of your way to move back. Then again, I'm not working in the hosting industry anymore, so I can talk this way without the pressures of the needs of the customer. Messing with Plesk (even a little) and taking a step back though, it sounds a bit messy to me. Wasn't there an option built-in to Plesk to do this anyway, or am I thinking of another language?

Posted by ub3r, 07-27-2008, 09:01 AM
Why are you going to continue running php4? Almost all scripts run on php5, and php4's end of life is due very soon.

Posted by SSHocker, 07-27-2008, 09:08 AM
If the script will only run on PHP4 it's probably an old insecure script, you'd need to question if you even want it on your server. To answer your question though yes its possible to run both

Posted by sallyanne, 07-27-2008, 02:40 PM
We already run PHP 5. The script is Typo3 content management system which runs best on PHP 4.

Posted by ServermanWebhosting, 07-27-2008, 03:01 PM
afaik typo3, in a actual version, requires the newest php 5.2.x only as fast-cgi supporting all functions. we have setup several installations with a mod_php5 and php5_fast_cgi switch with patches open_basedir and patched suexec. it works well, but u need to know how...

Posted by chaosuk, 07-27-2008, 05:50 PM
in some of the later versions of plesk php4 5 are already installed and ready to go. To check if you alreadyhave the support goto the domain in question and click on setup webhosting. In there under php support if both are installed there will be a dropdown box next to php support allowing you to select which version to run. If its not then you have to do this manually which is very tricky especially with plesk since its very easy to break plesk and not so easy to fix it again. I have done this a couple of times so please heed my warnings and dont be gunho about it. You will need to follow a specific plesk guide and make sure its for the exact same version you are running. Failing that you can always hire someone to o it for you if its worth the cost. It's an hours work for someone who knows what they are doing.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
URL Injection Attacks (Views: 284)
CAPTCHA Form (Views: 279)