Community

How check php version installed?

pk
pkjindal #1

I tried this command: php -i and php -v

but i said: -bash: php : command not found

where i’m doing mistake?

Cy
CyberPanel #2

Normally PHP binary is not available globally. You can make any PHP version available globally, they are located at:

/usr/local/lsws/lsphpXX/bin/php

So to make PHP 7.2 available globally you can do

cp /usr/local/lsws/lsphp72/bin/php /usr/bin
pk
pkjindal #3

@CyberPanel said:
Normally PHP binary is not available globally. You can make any PHP version available globally, they are located at:

/usr/local/lsws/lsphpXX/bin/php

So to make PHP 7.2 available globally you can do

cp /usr/local/lsws/lsphp72/bin/php /usr/bin

thx, actually i was trying some php command, non of them is working.

i want to check if phpredis is installed- php -m | grep redis

i guess it may not be installed, phpredis is also not available in bacekend, can you little tell how to install phpredis on php v5.6?

Cy
CyberPanel #4

On cli

yum install lsphp56-pecl-redis
pk
pkjindal #5

@CyberPanel said:
On cli

yum install lsphp56-pecl-redis

after installation, how can i check its running/installed or not?

Cy
CyberPanel #6

@pkjindal said:

@CyberPanel said:
On cli

yum install lsphp56-pecl-redis

after installation, how can i check its running/installed or not?

This is a PHP side extension, you need to install Redis separately. To confirm installation you can create a page with phpinfo() function

pk
pkjindal #7

@CyberPanel said:

@pkjindal said:

@CyberPanel said:
On cli

yum install lsphp56-pecl-redis

after installation, how can i check its running/installed or not?

This is a PHP side extension, you need to install Redis separately. To confirm installation you can create a page with phpinfo() function

redis server and extension both installed

thx alot! great support!

Sign in to reply