I'm running Debian 6 and I need to know what version of PHP I'm running, is there a command for this which I can run?
I tried "php -i" and "php -v" from a previous question..
root@azaz07:/srv/www/site.com/public_html# php -i
bash: php: command not found
root@azaz07:/srv/www/site.com/public_html# php -v
bash: php: command not found
Best Answer
A command like this will only work if you have the CLI version of PHP installed. If you have only the Apache module version of PHP this will not work.
You can install the CLI version with this command:
That should make the info and version commands work.
If PHP was installed via your package manager then a command like this might give useful results.
If PHP wasn't installed with your package manager and instead manually installed, then you might have to simply create a PHP script that looks like this
<?php phpinfo();
and then access that script through your web browser.