Basically i am new to php, and i just installed php on my machine. so we can know entire information of the php configuration by creating a php file and writing the below code in it
<?php
phpinfo();
?>
And i opened this through browser and can able to see all the configuration information
But is there any way to know the version of php default modules from linux terminal(I am using fedora by the way :) )
So what all i mean to ask is whether is there any way to find the version number of all the modules or individual modules from terminal through some php commands ?
For example there is a command php -me
which displays all the php modules that comes by default when php is installed like below
[PHP modules]
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
....
.....
but in the same way i want to find the version number of the individual module too from the terminal, how can we find it ?
php -i
and parse out the info you need. – Michael Berkowski Feb 8 '13 at 14:28$ php -i |grep -C4 -i version
– Michael Berkowski Feb 8 '13 at 14:30php -i |grep -C4 -i "openssl.*version"
The-C4
provides 4 lines of context above and below, so you may get additional stuff in there you don't need. – Michael Berkowski Feb 8 '13 at 14:35phpversion("modulename")
and you can therefore dophp -r "echo phpversion('modulename');"
from the CLI. OpenSSL doesn't give output though... – Michael Berkowski Feb 8 '13 at 14:39