Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that the windows version of Plesk allows you to select a version of PHP (4 or 5) for each domain you host, but can something be done for the Linux varient?

I've got a Plesk 9.5.3 Centos 5.2 dedicated server with root access. A couple of sites I'll be working on developing would require some PHP 5.3 functionality.

Is there a way, either by manipulating vhost.conf for each domain or by installing a module for Plesk, that I could have the facility to install and configure a different version of PHP to run for each domain on the box?

Ideally, it would default to PHP 5.2, with the option for 5.3 and eventually 6.x

My server is a bog standard Plesk installation - I've done nothing apart from install some extra PHP modules using YUM. Atomic has been used to update PHP to version 5.2.17 today.

share|improve this question

closed as off-topic by HopelessN00b Jan 14 '15 at 5:14

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 '15 at 5:14
up vote 1 down vote accepted

You could achieve this by installing php as a cgi script (which is basically what windows does), but then you would add a big overhead on cpu time and will make all your scripts quite slow (also consider the security implications).

In my personal taste it is better to keep your php up to date and make everyone comply with the php requirements, and if one of your customers needs an older php version just provide a cgi one warning on the slowness that'll result.

share|improve this answer
Thanks for the reply. I'm pretty confident about updating to 5.3 for everyone, but I'm a bit in the dark about how I could accomplish an older version running through CGI with Plesk? – BeesonBison Jan 21 '11 at 7:33
You just need to compile the old php version as a cgi script, copy the script into a common cgi-bin folder for all your users (achievable through ScriptAlias, then add the following line to the users virtual host Action application/x-httpd-php5 /cgipath/php-cgi. You can check a complete guide here – lynxman Jan 21 '11 at 8:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.