• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Multiple PHP Versions in Plesk 12.0 Out of the Box!

Still waiting on some feedback as to when this is going to be available for cloudlinux... my customers do NOT like php selector, and this needs to be available.
 
Hi. I see that the PHP version does not apply for cron jobs.
Is there a way to make the PHP selection work for cron jobs, or specify the version manually in the commandline?
 
I am running CentOS 6.6 / Plesk version 12.0.18 Update #53and note my php version is 5.3.3 which is getting alittle long in the tooth.

Trying to piece together a coherent story for php upgrades, I have found that Tools & Settings > Plesk > Updates & Upgrades has got me to 'Install or Upgrade Odin Products', although on first navigation there was an intermediate screen before the last that's since vanished!

Then under Parallels Plesk > Web hosting features > Different PHP interpreter versions I get to to being offered:
  • PHP 5.6
  • PHP 5.5
  • PHP 5.4
  • PHP 5.3 support
  • PHP 5.2 support
  • PHP5 support (from OS vendor)
Only the last, 'OS vendor' option is checked. I note too that I can check (green tick) multiple php versions, so quite what then does 'install' really mean? Does the 'install' simply provide the option of the new php version and do I then need to use the Service Plan Hosting Parameters to actually switch sites from one php version to another, e.g. I can have multiple php versions installed but then control which vhosts use which php version? Are there therefore several steps:
  1. Install new php version(s)
  2. Possibly create new Service Plan selecting the new php version
  3. Apply this new service plan to a test domain to ensure all works well on the new php version
  4. Then update the Hosting Parameters for the live/real domains to move from old to new version
So before I go and break my server...
  1. If I want to move to 5.4 or 5.5, do I simply select the desired version and click the 'Continue' button?
  2. Should I presume this update only installs the new php versions but does NOT alter any running vhost/site?
  3. Then test sites on the new php version as mentioned above
  4. Is there any regression option, should things go bad, e.g. to remove a php version?
  5. Is this the advised upgrade process?
  6. Should I presume Plesk 12 will be happy with any of these php versions, otherwise I'd not be being offered them, and indeed, given the php version seems to be applied via the Service Plan, how would I move Plesk itself to 5.4 or 5.5?
  7. Is there a php version you'd advise?
These are pretty key issues to know before I update the server and possible take all the vhosts offline due to a foul-up, and sadly, I don't have a spare VPS to practice on beforehand and so some notes on advised upgrade processes would really be appreciated :)
 
Hey.. Sorry, but did you read the guide? Almost all your questions should be answered by doing so.
http://kb.odin.com/en/125146
  • Plesk PHP packages do not conflict with or replace other PHP packages, so you can continue using your current PHP builds or third-party PHP packages.
  • After installation, new PHP versions will be available for selection in service plans and website hosting settings.
  • You should not change PHP for plesk itself.
  • Recommended version of PHP depends on which scripts you are using, but surely use a stable maintained version. 5.3 is deprecated, so i would select 5.4 as a minimum version.
  • I would recommend you to use the plesk packages for different PHP version as you probably don't have the knowledge to compile and maintain the versions and modules yourself.
 
Hey.. Sorry, but did you read the guide? Almost all your questions should be answered by doing so.
http://kb.odin.com/en/125146

Many thanks cbox. No, I'd not found that KB articcle else I'd not have asked, but it look the perfect answer. Thank you.

Yes, php 5.3.3 is indeed old, but it's still the CentOS bundled version and the version on my not so old VPS, but it is indeed because of its age I want to move up, probably to 5.5, but before I go and break multiple vhosts, wanted to be sure of things as the box is running live services.

Thanks again :)
 
I would like to use PEAR and PECL to install some php extensions (e.g. mcrypt, APCu and redis) for each php version separately. How do I use those tools since the additional php versions are located in /opt/plesk/php/5.* and the CentOS 7 managed one is in /etc/php.d/ .

Is it possible to install extensions for all versions in once or do i have to install it separately and how?

kind regards
 
I really nead all php versions for centos 5 (i can't update the verser without changing it materially for the moment.

Why only start to deliver these packages only since centos 6?

Lots of people are blocked for this.
 
I really nead all php versions for centos 5 (i can't update the verser without changing it materially for the moment.

Why only start to deliver these packages only since centos 6?

Lots of people are blocked for this.

Big up for this.
 
I've installed php 5.4/.5 and .6 to my server as per http://kb.odin.com/en/125146, using the Add/Remove Components UI. This is to provide me an upgrade/downgrade path in case of problems in moving from 5.3.3 as per the CentOS default build. So...

phpVersions.png


However, when I go over into the service plans, the only option is the default 5.3.3:

phpOptions.png


Is there something I need to do to have Plesk recognise the new php versions and so make them available in the Service Plans > Hosting Parameters UI?

rpm confirm the Plesk php packages are loaded:

# rpm -qa|grep "plesk-php"
plesk-php54-soap-5.4.43-centos6.15071310.x86_64
plesk-php56-mcrypt-5.6.11-centos6.15071310.x86_64
plesk-php56-process-5.6.11-centos6.15071310.x86_64
plesk-php55-dba-5.5.27-centos6.15071310.x86_64
plesk-php55-tidy-5.5.27-centos6.15071310.x86_64
plesk-php55-xdebug-2.2.3-centos6.14122215.x86_64
plesk-php54-redis-2.2.5-centos6.15020220.x86_64
plesk-php56-redis-2.2.5-centos6.15030613.x86_64
plesk-php56-pdo-5.6.11-centos6.15071310.x86_64
plesk-php55-pear-1.9.4-centos6.15071310.noarch
plesk-php56-pgsql-5.6.11-centos6.15071310.x86_64
plesk-php54-intl-5.4.43-centos6.15071310.x86_64
plesk-php54-xmlrpc-5.4.43-centos6.15071310.x86_64
plesk-php56-gd-5.6.11-centos6.15071310.x86_64
plesk-php56-enchant-5.6.11-centos6.15071310.x86_64
plesk-php55-xmlrpc-5.5.27-centos6.15071310.x86_64
plesk-php55-gd-5.5.27-centos6.15071310.x86_64
plesk-php54-xml-5.4.43-centos6.15071310.x86_64
plesk-php55-odbc-5.5.27-centos6.15071310.x86_64
plesk-php54-mysql-5.4.43-centos6.15071310.x86_64
plesk-php54-mcrypt-5.4.43-centos6.15071310.x86_64
plesk-php54-snmp-5.4.43-centos6.15071310.x86_64
plesk-php54-tidy-5.4.43-centos6.15071310.x86_64
plesk-php56-opcache-5.6.11-centos6.15071310.x86_64
plesk-php56-bcmath-5.6.11-centos6.15071310.x86_64
plesk-php56-pspell-5.6.11-centos6.15071310.x86_64
plesk-php56-xmlrpc-5.6.11-centos6.15071310.x86_64
plesk-php55-pspell-5.5.27-centos6.15071310.x86_64
plesk-php55-snmp-5.5.27-centos6.15071310.x86_64
plesk-php55-bcmath-5.5.27-centos6.15071310.x86_64
plesk-php55-intl-5.5.27-centos6.15071310.x86_64
plesk-php55-release-5.5.27-centos6.15071310.x86_64
plesk-php55-ioncube-loader-4.7.2-centos6.14122215.x86_64
plesk-php54-xcache-3.2.0-centos6.15020220.x86_64
plesk-php54-ioncube-loader-4.7.2-centos6.15020220.x86_64
plesk-php54-5.4.43-centos6.15071310.x86_64
plesk-php54-cli-5.4.43-centos6.15071310.x86_64
plesk-php55-cli-5.5.27-centos6.15071310.x86_64
plesk-php54-pear-1.9.4-centos6.15071310.noarch
plesk-php56-mysql-5.6.11-centos6.15071310.x86_64
plesk-php54-pgsql-5.4.43-centos6.15071310.x86_64
plesk-php54-process-5.4.43-centos6.15071310.x86_64
plesk-php54-gd-5.4.43-centos6.15071310.x86_64
plesk-php54-imap-5.4.43-centos6.15071310.x86_64
plesk-php54-release-5.4.43-centos6.15071310.x86_64
plesk-php56-mbstring-5.6.11-centos6.15071310.x86_64
plesk-php56-soap-5.6.11-centos6.15071310.x86_64
plesk-php56-ldap-5.6.11-centos6.15071310.x86_64
plesk-php56-imap-5.6.11-centos6.15071310.x86_64
plesk-php55-imap-5.5.27-centos6.15071310.x86_64
plesk-php55-soap-5.5.27-centos6.15071310.x86_64
plesk-php55-process-5.5.27-centos6.15071310.x86_64
plesk-php55-redis-2.2.5-centos6.14122215.x86_64
plesk-php54-imagick-3.1.2-centos6.15061118.x86_64
plesk-php56-xdebug-2.2.3-centos6.15030613.x86_64
plesk-php56-imagick-3.1.2-centos6.15061116.x86_64
plesk-php56-5.6.11-centos6.15071310.x86_64
plesk-php55-pdo-5.5.27-centos6.15071310.x86_64
plesk-php56-xml-5.6.11-centos6.15071310.x86_64
plesk-php56-pear-1.9.4-centos6.15071310.noarch
plesk-php55-pgsql-5.5.27-centos6.15071310.x86_64
plesk-php54-odbc-5.4.43-centos6.15071310.x86_64
plesk-php54-dba-5.4.43-centos6.15071310.x86_64
plesk-php54-pspell-5.4.43-centos6.15071310.x86_64
plesk-php55-mbstring-5.5.27-centos6.15071310.x86_64
plesk-php54-bcmath-5.4.43-centos6.15071310.x86_64
plesk-php56-snmp-5.6.11-centos6.15071310.x86_64
plesk-php56-release-5.6.11-centos6.15071310.x86_64
plesk-php55-ldap-5.5.27-centos6.15071310.x86_64
plesk-php55-mcrypt-5.5.27-centos6.15071310.x86_64
plesk-php55-imagick-3.1.2-centos6.15061117.x86_64
plesk-php54-xdebug-2.2.3-centos6.15020220.x86_64
plesk-php55-5.5.27-centos6.15071310.x86_64
plesk-php56-cli-5.6.11-centos6.15071310.x86_64
plesk-php55-mysql-5.5.27-centos6.15071310.x86_64
plesk-php54-ldap-5.4.43-centos6.15071310.x86_64
plesk-php54-mbstring-5.4.43-centos6.15071310.x86_64
plesk-php56-dba-5.6.11-centos6.15071310.x86_64
plesk-php56-intl-5.6.11-centos6.15071310.x86_64
plesk-php56-tidy-5.6.11-centos6.15071310.x86_64
plesk-php55-opcache-5.5.27-centos6.15071310.x86_64
plesk-php55-enchant-5.5.27-centos6.15071310.x86_64
plesk-php56-ioncube-loader-4.7.2-centos6.15030613.x86_64
plesk-php54-pdo-5.4.43-centos6.15071310.x86_64
plesk-php55-xml-5.5.27-centos6.15071310.x86_64
plesk-php56-odbc-5.6.11-centos6.15071310.x86_64
plesk-php54-enchant-5.4.43-centos6.15071310.x86_64
 
Check that PHP5.3 is not listed in Server Components list. Click Refresh button there if necessary.
 
Check that PHP5.3 is not listed in Server Components list. Click Refresh button there if necessary.
Thanks IgorG, however, I can restart the server, restart my laptop, restart my browser and Ctrl+F5 refresh the page, but the installed components and versions of php avaialbe in the Service Plans remain the same...default (5.3.3), 5.4, 5.5 and 5.6 installed under Web Hosting Features, but only 5.3.3 offered under Hosting Parameters.

Should I uninstall and reinstall? Whatever it going on, it's not a page caching issue.
 
Once again - which versions of PHP are listed in Server Components as installed?
 
Igor, under 'Add or Remove Components' it shows: default (5.3.3), 5.4, 5.5 and 5.6 are all installed as below:

phpVersions.png


rpm also lists among other packages:
  • plesk-php54-process-5.4.43-centos6.15071310.x86_64
  • plesk-php55-process-5.5.27-centos6.15071310.x86_64
  • plesk-php56-process-5.6.11-centos6.15071310.x86_64
Looking under: Home > Tools & Settings > Plesk Components it lists:

Component name
sort-up.gif
Component version
awstats 7.3-14050621.parallels
courier-imap 4.15-cos6.build1200150114.15
health-monitor 12.0.18-cos6.build1200140526.11
httpd 2.2.15-45.el6.centos
mod_bw 0.92-14060421
mysql 5.1.73-5.el6_6
php 5.3.3-46.el6_6
phpmyadmin 4.4.9-cos6.build1200150615.10
phppgadmin 5.1-cos6.build1200140423.17
postfix 2.8.17-14042513
PPSitebuilder 12.0.7-14111811
psa 12.0.18-cos6.build1200140606.15
psa-api-rpc 12.0.18-cos6.build1200140606.15
psa-autoinstaller 3.16.20-140624.15
psa-backup-manager 12.0.18-cos6.build1200140606.15
psa-horde 5.2.6-cos6.build1200150722.16
psa-imp 6.2.9-cos6.build1200150706.15
psa-kav8 8.0.3-0.14061710
psa-logrotate 3.8.2-cos6.build115130211.11
psa-mod-fcgid-configurator 2.3.9-14033111
psa-proftpd 1.3.5-cos6.build1200140529.18
psa-spamassassin 12.0.18-cos6.build1200140606.15
psa-turba 4.2.7-cos6.build1200150706.15
spamassassin 3.3.1-3.el6
SSHTerm 0.2.2-10.14033111

So only the default 5.3.3. Why would 'Install or Upgrade Odin Products' and rpm show the other php versions as installed, but Server Compoents show something different?

Thx
 
Hi iainh,

using the command

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --show-components --show-options

will post as well the actual installed components and its installation status, as well as the options, to update or upgrade the components.

The individual command:

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component qmail
( please always use the Plesk component name as the "--show-components --show-options" printed out, please )

... for example, will install qmail ( and remove postfix ) on your server. More options with the autoinstaller command can be seen with:

/usr/local/psa/admin/bin/autoinstaller --help


If you experience issues/problems while installing components, please keep in mind, that Plesk stores installations / repairing logs in "/var/log/plesk/install". Please be so kind to include errors from these logs in posts.
 
Thanks UFHH01

Okay, --show-options gives an error, but dropping the --show options shows me (abridged):

./autoinstaller --select-product-id plesk --select-release-current --show-components
Doing restart of Parallels Installer...
...
File downloading php56.inf3: 100% was finished.
File downloading php55.inf3: 100% was finished.
File downloading php54.inf3: 100% was finished.
File downloading php53.inf3: 100% was finished.
File downloading php52.inf3: 100% was finished.
Checking for installed packages...
...
File downloading PHP_5.6.11/php56-5.6.11-cos6-x86_64.plesk12.inf3: 84%..100% was finished.
File downloading PHP_5.5.27/php55-5.5.27-cos6-x86_64.plesk12.inf3: 84%..100% was finished.
File downloading PHP_5.4.43/php54-5.4.43-cos6-x86_64.plesk12.inf3: 84%..100% was finished.
File downloading PHP_5.3.29/php53-5.3.29-cos6-x86_64.plesk12.inf3: 81%..100% was finished.
File downloading PHP_5.2.17/php52-5.2.17-cos6-x86_64.plesk12.inf3: 84%..100% was finished.
Loaded plugins: fastestmirror

Detecting installed product components.
...
php5.6 [up2date] - PHP 5.6
php5.5 [up2date] - PHP 5.5
php5.4 [up2date] - PHP 5.4
php5.3 [install] - PHP 5.3 support
php5.2 [install] - PHP 5.2 support


So this says 5.4, 5.5 and 5.6 were downloaded, are installed and are up-to-date. Now I can reinstall via the CLI, but this is saying they are already installed, it's just they don't show in my php Hosting Parameters. Should I download and re-install via the CLI using:

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component php5.4
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component php5.5
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component php5.6


Thanks for the advice, it's just with (so far) everything saying the various php versions are downloaded and installed, I'm just trying to ensure the 'fix' is to do it all again via the CLI?

Thx
 
Hi iainh,

no... this is not a "fix"... you only can be sure now, that the "Plesk Control Panel - Updates/Upgrades" show the correct installed versions and you have to investigate now, why you still can't change the php-handler over the service plan settings. One step after the other, please. ^^

As a next step, consider using the "bootstrapper" repair - utilty, which corrects and repairs quite a lot of issues / problems.

/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair
 
Back
Top