How do I get the Apache version?
Actually, I want to use the setenv() function in a PHP file, but I am not able to use that. It throws an error, undefined call to a function setenv(). It might be because of my Apache version.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a nice script for it: http://snipplr.com/view/10881/get-apache-version/
The Apache version is contained in the predefined variable:
You could also use phpinfo() to get much information about the server, including all $_SERVER variables, activated modules and disabled functions.