D
dericknwq
Guest
I have been browsing the forums here and I know many of you are hoping to setup PHP4 along with PHP5. You are not alone. Since I have got it working fine right now, I thought it will be good to share. 
Thanks to this article at Media Temple, I got my quick and easy solution. I'm assuming that you guys are running Plesk 8.1 and have got PHP4 by default. Also, we wouldn't be having the latest and greatest PHP5 version this way but well, you can always compile your own (just more complicated). I am no expert so I am pretty happy with the results I've gotten now. So here we go, finally.
Since we are running PHP5 as FastCGI, you will need mod_fastcgi and PHP5 obviously. Thankfully, you can get this installed right from the Plesk Admin panel! The trick here is that, the SiteBuilder component will install PHP 5.1.4 along with it so that is why I said this is easy.
Go to Server >> Updater and check:
Once done, pick your choice of PHP5 setup from that article mentioned earlier.
I am personally taking the "Running PHP via suexec" approach but with minor differences which I'll highlight here.
The original vhost.conf as on the article:
My version:
So that is left with just that two lines of FCGIWrapper directives.
Finally, you will just throw in this in your .htaccess at whichever folder you want PHP5 to be used instead.
So now you can have PHP5 running happily where you want to! Additional reading at http://www.deanspot.org/~alex/php5fcgi/index.html will be useful for those who wish to compile their own PHP5 version. I guess this should be all and happy PHP-ing.
Thanks to this article at Media Temple, I got my quick and easy solution. I'm assuming that you guys are running Plesk 8.1 and have got PHP4 by default. Also, we wouldn't be having the latest and greatest PHP5 version this way but well, you can always compile your own (just more complicated). I am no expert so I am pretty happy with the results I've gotten now. So here we go, finally.
Since we are running PHP5 as FastCGI, you will need mod_fastcgi and PHP5 obviously. Thankfully, you can get this installed right from the Plesk Admin panel! The trick here is that, the SiteBuilder component will install PHP 5.1.4 along with it so that is why I said this is easy.
Go to Server >> Updater and check:
- FastCGI support (mod_fcgid)
- SiteBuilder and Sitebuilder module for Plesk
Once done, pick your choice of PHP5 setup from that article mentioned earlier.
I am personally taking the "Running PHP via suexec" approach but with minor differences which I'll highlight here.
The original vhost.conf as on the article:
Code:
AddHandler fcgid-script .php5
SuexecUserGroup <domain-user> psacln
<Directory /var/www/vhosts/<domain>/httpdocs>
FCGIWrapper /var/www/vhosts/<domain>/bin/php5 .php5
Options ExecCGI
allow from all
</Directory>
Code:
# Removed since I prefer a per folder .htaccess approach
# AddHandler fcgid-script .php5
# This directive is in the default httpd.include so skip it
# SuexecUserGroup <domain-user> psacln
<Directory /var/www/vhosts/<domain>/httpdocs>
FCGIWrapper /var/www/vhosts/<domain>/bin/php5 .php
FCGIWrapper /var/www/vhosts/<domain>/bin/php5 .php5
# These directives are in the default httpd.include so skip it
# Options ExecCGI
# allow from all
</Directory>
Finally, you will just throw in this in your .htaccess at whichever folder you want PHP5 to be used instead.
Code:
# I want all .php and .php5 files to be PHP5-ed
AddHandler fcgid-script .php .php5