• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

change php -v in ssh using plesk version

yulian

New Pleskian
is there anyone can guide me how to change php -v in ssh (os vendor) to use plesk version
i need to replace os vendor version with plesk version
but all reference me to uninstall os vendor php and install php fro other repo

thank you
 
Hello, there's a simple workaround.
Edit the .bash_profile file in root and put the Plesk desired PHP path before the system PHP.

E.G.
# PATH=/opt/plesk/php/5.6/bin:$PATH:$HOME/bin

When calling php, it will be executed in the first place bash founds it, /opt/plesk/php/5.6/bin

Cheers
 
OK this is great solution but how one disables
;zend_extension=/usr/lib64/php/ioncube/ioncube_loader_lin_5.4.so
just for that domain/user ?

I know how to disable opcache from inside the plesk>domain>php settings but ssh php has its own settings

I have tried to disable by commenting out the extension
/etc/php.d/ioncube-loader.ini
and restaring apache
# /etc/init.d/httpd restart
but still get opcache and ioncube loader loaded

Code:
-bash-4.1$ php -v
PHP 5.6.29 (cli) (built: Dec  9 2016 12:06:17)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Any other suggestion would be appreciated
which is the specific php.ini that is loaded when php runs from the command line ?

here is all the php.ini that exist in the system
Code:
#find / -name 'php.ini' 2> /dev/null
/opt/plesk/php/7.0/etc/php.ini
/opt/plesk/php/5.4/etc/php.ini
/opt/plesk/php/5.2/etc/php.ini
/opt/plesk/php/5.5/etc/php.ini
/opt/plesk/php/5.3/etc/php.ini
/opt/plesk/php/5.6/etc/php.ini
/usr/local/psa/bootstrapper/pp17.0.17-bootstrapper/php.ini
/usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/php.ini
/usr/local/psa/admin/conf/php.ini
/var/www/vhosts/system/domain.com/etc/php.ini
/etc/php.ini
/etc/psa-webmail/roundcube/php.ini
/etc/psa-webmail/horde/horde/php.ini
 
Back
Top