How can I determine what version of PHP is running on my server? If you have command line access to the server then type:
or
And you’ll get a result similar to this:
|
|
[root@localhost]# php -v PHP 4.3.11 (cli) (built: Jun 7 2005 08:14:45) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies |
Be careful using this approach. It is possible that there is more then one install of PHP on your server and the webserver may be using an install that is not in your command line path. Use the whereis command to check for multiple installs like this:
|
|
[root@localhost]# whereis php php: /usr/bin/php /etc/php.d /etc/php.ini /usr/local/bin/php /usr/local/lib/php |
Notice the second install at /usr/local/bin/php. If we check the version of the second install we might get different. Another way to determine the version is to create a test page on the webserver. Place the following line in the file:
Call the file “test.php”. Next with a web browser access the file with: http://www.myserver.com/test.php You’ll get back an extensive report on the configuration of