Centos 5.6: Find PHP Version using Command Line

I wanted to install phpmyadmin on Centos 5.6 Machine. I check from phpmyadmin official web site, phpmyadmin requires at least PHP 5.2 and MySQL 5. I have to check my php version 1st before start install.

Here is a useful command to display or show what version of php you have installed in your Linux Machine.

Just enter following command to check your PHP Version

[ 2]# php -v
PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Once you enter the php -v command, you should able to see the result like what i show you above, if you don’t get something like the above, then it means that you don’t have php installed in your server.