skip to Main Content

I am quite new to Linux servers, but I found something strange to me and maybe someone can give a proper explanation for this:
In PLESK Admin Panel on “Hosting Settings” for my domain the PHP version is 5.6.
But when I access via SSH to my server and type php -v it says that I have version 5.4. Why the information is different and which one is the real?

2

Answers


  1. When you run php -v via ssh session, you run system or OS vendor’s php. Plesk PHPs for hosting are located in /opt/plesk/php/X.X/bin/php where X.X is version of PHP.

    Login or Signup to reply.
  2. Try this better option
    ssh as root user and use this commands one by one.

    mv /usr/bin/php /usr/bin/php.backup
    mv /usr/bin/php-cgi /usr/bin/php-cgi.backup
    
    ln -s /opt/plesk/php/5.6/bin/php /usr/bin/php
    ln -s /opt/plesk/php/5.6/bin/php-cgi /usr/bin/php-cgi
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search