• 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 version via .bashrc file for all system user

What about just upgrade your php version from OS vendor to needed version?
 
Hi,

Does it mean it will help ?
Can you please update me the exact steps? Or if there is a knowledge base link
 
I have no exact step-to-step instruction. It is just direction. For example, you have PHP version 5.3 from your OS vendor. You need to find third-party repository for your OS where PHP 7.x is included. Then add this repository and upgrade your outdated system php to new one from this repository.
If I'm not mistaken it is your goal?
 
What do you mean exactly "default for all"? For all websites hosting or as default php in command line interface?
In the second case why do you want to use as default php in command line exactly this Plesk php version? At the moment your default system php is /usr/bin/php and most probably it looks like:

# /usr/bin/php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.

So, it is outdated PHP 5.x version from your OS vendor:

# rpm -qf /usr/bin/php
php-cli-5.4.16-46.el7.x86_64
# rpm -qi php-cli | grep Vendor
Vendor : CentOS

Then just ask Google for a phrase like "how to upgrade php on centos 7" and use instruction with adding third-party repo REMI or EPEL. For example How to install or upgrade to PHP 7 on CentOS 7 Linux Server - LinuxConfig.org

After that, you will have system PHP 7.x for your CLI operations and mentioned by you Plesk PHP 7.2 for websites hosting.
 
Back
Top