Setup Multi Version of PHP under Plesk 11.5

Tested Environment
OS : CentOS 5.10 and CentOS 6.5
Plesk Versions : 11 and 11.5

Preparation: Install required components

From PPP, install the app template "devel"
yum groupinstall "Development tools"
yum install libjpeg-devel libc-client-devel libicu-devel libmcrypt-devel.x86_64 unixODBC-devel postgresql-devel aspell-devel libtool-ltdl-devel gmp-devel openldap-devel net-snmp-devel libxslt-devel

Compile and install PHP. This article is using PHP verison 5.4.30 as example.

1. Login to VPS via SSH

2. Download and extract the php source files. Use wget to download the php source gzip file. Check the version in the link

cd /tmp
wget http://hk1.php.net/distributions/php-5.4.30.tar.gz
tar zxf php-5.4.30.tar.gz
cd php-5.4.30/

3. Configure and compile PHP

./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php540-cgi' '--with-config-file-path=/usr/local/php540-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php540-cgi' '--with-png-dir=/usr/local/php540-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php540-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php540-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php540-cgi/pear' '--with-mcrypt' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php540-cgi/php.d'

make

make install

4. Copy the php.ini file

cp /etc/php.ini /usr/local/php540-cgi/etc/php.ini

5. Register new PHP under Plesk

/usr/local/psa/bin/php_handler --add -displayname 5.4.30-custom -path /usr/local/php540-cgi/bin/php-cgi -phpini /usr/local/php540-cgi/etc/php.ini -type cgi -id 5.4.30-custom

Select New Installed PHP under Plesk Panel:

1. Goto Hosting Settings
2. Select : PHP support (Run PHP as "CGI Appliction" , PHP version "5.4.30-custom" )
PHP Setting

Source:

http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=72042.htm

http://kb.parallels.com/114753
http://kb.parallels.com/en/118378


  • 3 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

Setup DNS in Plesk

Please note that we do not offer DNS hosting. To get your site hosted on the VPS, you can either:...

How to create a catch-all email account

From Plesk control panel, select your domain name. Then click on "Mail Accounts" > "Mail...

Enabling Submission Port from Plesk control panel

If SMPT port 25 is not working from your end, kindly enable Submission Port from Plesk.It's very...

Creating FTP account

FTP account is created upon adding a domain in Plesk.If you have not yet added your domain in...

Creating an email account

To create an email account, login first to Plesk control panel.1. Click on Domains.2. Select your...