Yasen Ivanov
Yasen Ivanov

Reputation: 1023

PHP Version on Plesk and CentOS are different?

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?

Upvotes: 1

Views: 1064

Answers (2)

tasz rex
tasz rex

Reputation: 1

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

Upvotes: 0

IgorG
IgorG

Reputation: 1211

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.

Upvotes: 2

Related Questions