• 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.

Issue PHP version

gforce39

New Pleskian
Hi,

Version Plesk v12.5.30_build1205150826.19 os_CentOS 7
OS CentOS Linux 7.2.1511 (Core)

I'm sure this has been covered a few times but I am at a top gap with it.

I need to enable php version for a subdomain, now this part works perfect. Go into the PHP settings change the PHP support to the version installed which in my case is changing it from 5.4.16 to 5.6.24. This works fine for the website.

The problem is when i ssh into the server and do "php -v" it picks up the 5.4.16 version. I need to issue a command to create a framework which needs php version 5.6 or later.



Thanks for any help.
 
Hi gforce39,

The problem is when i ssh into the server and do "php -v" it picks up the 5.4.16 version
... and this is absolutely the correct output, if your basic PHP version on your server is 5.4.16.

Pls. be aware, that Plesk - PHP - versions are located at "/opt/plesk/php", so if you would like to use corresponding commands like "php -v" for each Plesk - PHP - version, you would use:

Code:
/opt/plesk/php/5.2/bin/php -v
/opt/plesk/php/5.3/bin/php -v
/opt/plesk/php/5.4/bin/php -v
/opt/plesk/php/5.5/bin/php -v
/opt/plesk/php/5.6/bin/php -v
/opt/plesk/php/7.0/bin/php -v

Code:
/opt/plesk/php/5.2/bin/php -m
/opt/plesk/php/5.3/bin/php -m
/opt/plesk/php/5.4/bin/php -m
/opt/plesk/php/5.5/bin/php -m
/opt/plesk/php/5.6/bin/php -m
/opt/plesk/php/7.0/bin/php -m

Code:
/opt/plesk/php/5.2/bin/phpize
/opt/plesk/php/5.3/bin/phpize
/opt/plesk/php/5.4/bin/phpize
/opt/plesk/php/5.5/bin/phpize
/opt/plesk/php/5.6/bin/phpize
/opt/plesk/php/7.0/bin/phpize

Code:
/opt/plesk/php/5.2/bin/pecl
/opt/plesk/php/5.3/bin/pecl
/opt/plesk/php/5.4/bin/pecl
/opt/plesk/php/5.5/bin/pecl
/opt/plesk/php/5.6/bin/pecl
/opt/plesk/php/7.0/bin/pecl

Code:
/opt/plesk/php/5.2/bin/pear
/opt/plesk/php/5.3/bin/pear
/opt/plesk/php/5.4/bin/pear
/opt/plesk/php/5.5/bin/pear
/opt/plesk/php/5.6/bin/pear
/opt/plesk/php/7.0/bin/pear
 
Hi gforce39,

if I understood your question correctly, then you would like to ask, how you can use the command "php -m" for your basic, vendor version?

The answer is already given by yourself in the first post of the thread:
when i ssh into the server and do "php -v" it picks up the 5.4.16 version
As you can see, you where trying to use the basic, vendor PHP version on your server to reply with it's version ( -v / additional command string ). If you would like a reply for the compiled in modules, you could use the command "php -m" ( or even better, you would use the FULL PATH, as you would do this with Plesk - PHP - versions as well: "/usr/bin/php -m" ).
 
Back
Top