Instructions to install Multiple PHP Version on Plesk 12.5

The Mutiple PHP function on Plesk is one of the landmark functions of this product. Bring flexibility to users. With Plesk version 12.5, this function is supported by default. However, users of Plesk versions 11.0, 11.5 should not worry, because this article will guide you how to do this. install Mutiple PHP Version on Plesk 12.5 (Window OS & Linux OS).

I. Install on Linux

Step 1: Download the PHP source from the site

Step 2: Extract the file with the command tar –xjvf php-NN.tar.bz2

Example: tar –xjvf php.5.2.11.tar.bz2

After unzipping:

Step 3: Move the directory containing the extracted PHP source to the /usr/local/src path with the command
mv php-5.2.11 /usr/local/src/

Step 4: Use the command cd /usr/local/src/php-5.2.11 to go to the PHP source directory

Step 5: Install the required PHP libraries with the following command:

yum install libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel mysql-devel ncurses-devel unixODBC-devel net-snmp-devel mhash-devel libc-client-devel libicu-devel gcc postgresql-devel aspell-devel libxslt-devel gcc-c++ openldap-devel

Step 6: Configure and build PHP, using the command structure: ./configure –prefix /usr/local/php-NN. Here we use the corresponding command: ./configure –prefix /usr/local/php-5.2.11

Step 7: Launch command make

Complete the command make

Step 9: Run command make install to install PHP

Note paths after running the command make install as shown below

Step 10: Install the php.ini file with the command: cp php.ini-recommended /usr/local/php-NN/etc/php.ini

In there: php-NN is the version of php you are installing

Step 11: Register a new PHP version with the command: /usr/local/psa/bin/php_handler –add -displayname -path -phpini -type -id

In there:

· displayname : display name of new PHP version

· -path : is the path containing the PHP CGI file. You can see this path after launching the command make install at line Installing PHP CGI

· -phpini : is the path to the PHP.ini file. You can see this path when you run the command cp php.ini-recommended /usr/local/php-NN/etc/php.ini

· -type : is the type of PHP handler associated with this version. For more information on this issue, please see details at the link:

· -id : is the notation you use to distinguish between PHP versions.

After running the above command, the system will notify the completion of PHP version registration.

To check the installed PHP versions, use the command: /usr/local/psa/bin/php_handler –list

II. Install on Windows

All commonly used PHP versions are already available in the Plesk Panel, just do the following.

Step 1: Login to Plesk Panel by link https://:8447/summary.html with the server’s user and password.

Step 2: Choose Add/Remove Components

Step 3: Tick select the PHP versions want to install and select Continue

Complete installation.

III. How to Use the Mutiple Function PHP Version

After completing the installation of Mutilple PHP Version, you can customize for Service Plan or Subscriptions

  • Service Plan >> PHP Settings
  • Subscriptions >> Domain >> PHP Settings


Categorized as Office 365

By Nguyen Manh Cuong

Nguyen Manh Cuong is the author and founder of the nguyendiep blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.

Leave a comment

Your email address will not be published. Required fields are marked *