Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 bobulous.org.uk/coding/apache-php-cgi.html –  lynxman Jan 21 '11 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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