title: Getting Apache Version Using PHP Alternative
body: <p>Is there an alternative way to get my Apache version without using the below code?</p>
  
  <pre><code>&lt;?php echo $_SERVER['SERVER_SOFTWARE']; ?&gt;
  </code></pre>
  
  <p>Returns "Apache".</p>
  
  <pre><code>&lt;?php echo apache_get_version(); ?&gt;
  </code></pre>
  
  <p>Returns "Fatal error: Call to undefined function apache_get_version()".</p>
  
  <p>Note: I am using a Linux server with PHP v5.3.1, and anything returned with a linux-only command via the shell using exec() or shell_exec() would be acceptable. I just want to get it detecting the version of Apache for Linux at least.</p>