tags:

views:

33

answers:

2

Hello, everyone i want to get apache version. Actualy i want to use setenv() function in php file . but i m not able to use that its throughing an error undefined call to a function setenv() . it might b because of my apache version.Please suggest

Thanks & Regards

Shri.

+2  A: 

Here is a nice script for it: http://snipplr.com/view/10881/get-apache-version/

The apache version is contained in the predefined variable

$_SERVER['SERVER_SOFTWARE']

You could also use phpinfo() to get much information about the server, including all $_SERVER variables, activated modules and disabled functions.

alexteg
Shri.harry
You can also try to use apache_get_version() http://www.php.net/manual/en/function.apache-get-version.php
alexteg
A: 

This will give you the version of apache:

echo $_SERVER['SERVER_SOFTWARE'];
Max