• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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