Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Apache version

Tags:

php

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.

like image 335
Shri.harry Avatar asked May 28 '10 09:05

Shri.harry


1 Answers

You should be able to use the simple built-in php function apache_get_version();

from php manual :

<?php
$version = apache_get_version();
echo "$version\n";
?>
like image 170
Obmerk Kronen Avatar answered Sep 24 '22 02:09

Obmerk Kronen