• 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

Resolved PHP CLI version

Timo002

Basic Pleskian
Hello,

I'm using multiple PHP versions on my Plesk installation. Now I noticed, that if I set a PHP version to 5.6 or 7.x, the CLI is not updated. This one stays on PHP 5.4.45.

However, I'm running command line scripts that require at least 5.5.9.

How will I be able to update the CLI version of PHP?
 
PHP ClI can be found here

/opt/plesk/php/5.x/bin/

or

/opt/plesk/php/7.0/bin/
 
@IgorG, Aaah, now I understand. Yes, that might be an solution :)

If I want, can I change the version op PHP CLI so that it is out of the box 5.6?
 
@IgorG, I understand that I can add that in front of my script. But what if I want to update the PHP CLI version to 5.6, so I don't need to add `/opt/plesk/php/5.6/bin/php` every time in front of my commands.
 
Well. Let me clarify a little bit.
You have two types of user's PHP on your server - from OS vendor and from Plesk. Plesk PHPs located in /opt/plesk/php/x.x/bin/...
System (OS vendor) PHP locates in /usr/bin/php
For web hosting you can use PHP from Plesk or from OS vendor - just set it up in PHP Settings of subscription.
For using PHP in CLI you can use system (OS vendor) PHP like

# php scritp.php

or PHP versions from Plesk like it was described above:

# /opt/plesk/php/5.5/bin/php yourscript.php
# /opt/plesk/php/5.6/bin/php yourscript.php
# /opt/plesk/php/7.0/bin/php yourscript.php

etc.

If you need update system PHP from OS vendor repository - use system package manager like yum for CentOS or apt-get for Debian/Ubuntu. For upgrading PHPs from Plesk - use Plesk autoinstaller.
 
@IgorG, Another question regaring upgrading the PHP version of the OS.

I'm running Plesk 12.5.30 on CentOS 7.2.1511.
I updated the PHP version of CentOS by doing the following.
Code:
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# yum install php56w
# yum install php56w-opcache
# yum install yum-plugin-replace
# yum replace php-common --replace-with=php56w-common

When I now update Plesk (https://domail.tld:8447/update_components.html), I get an error.
Installation of the selected components requires that the following components be also installed:

PHP 5 from OS vendor

To install all the required components, click Continue. To cancel installation of components, either clear the corresponding check boxes or select corresponding option from the actions list.

Looking at the installed Plesk components:
Code:
php      5.6.18-1.w7
php-fpm  5.6.18-1.w7
php56    5.6.18-centos7.16021111
php70    7.0.3-centos7.16021111

Do you have any ideas?
 
Olá Igor .
I need to install old versions of php from 5x 5x2 5x4 But I see that via plesk panel it is no longer possible.
Only 5.6 forward

How can I have these versions on my Windows server?
I have the versions folders on another server, just copy to

C:\Program Files (x86)\Plesk\Additional

Thank you so much
@IgorG
 
@Jhow Plug These ancient and very vulnerable PHP versions have long been at the End Of Life stage and are not supported by Plesk. I don't know how to install them on modern versions of Plesk, and I strongly recommend you don't do it if you want to keep your server's data safe. Better consider upgrading to modern supported PHP versions.
 
@Jhow Plug Essas versões antigas e muito possíveis do PHP estão há muito tempo no estágio de fim de vida e não são suportadas pelo Plesk. Não sei como instalá-los em versões modernas do Plesk e recomendo fortemente que você não o faça se quiser manter os dados do seu servidor seguros. Melhor considerar a atualização para versões modernas do PHP com suporte.
Ok, muito obrigado pela atenção e feedback.
 
Back
Top