title: phpinfo() not working on mac OS-X Capitan apache2 server
body: <p>I am using <code>OS-X Capitan</code> and <code>Apache/2.4.18 (Unix)</code>. I have below <code>phpinfo.php</code> file</p>
  
  <pre><code> &lt;?php phpinfo(); ?&gt;
  </code></pre>
  
  <p>when I run the command <code>php phpinfo.php</code> it will show <code>phpinfo()</code> correctly. This is not showing correctly from browser but instead shows the code as below</p>
  
  <pre><code> &lt;?php phpinfo(); ?&gt;
  </code></pre>
  
  <p>I have made following changes to <code>/etc/apache2/httpd.conf</code></p>
  
  <ol>
  <li><p>uncommented below lines</p>
  
  <p><code>LoadModule rewrite_module libexec/apache2/mod_rewrite.so
  LoadModule php5_module libexec/apache2/libphp5.so</code></p></li>
  <li><p>Added <code>MIME Type</code> inside <code>&lt;IfModule mime_module&gt;</code> tag to above <code>httpd.conf</code> file</p>
  
  <p><code>AddType application/x-httpd-php .php</code></p></li>
  <li><p>Made sure that <code>libexec/apache2/mod_rewrite.so</code> exists</p></li>
  <li><p>php -v gives below result</p></li>
  </ol>
  
  <p><code>PHP:  parse error in /etc/php.ini on line 107
  PHP 5.5.31 (cli) (built: Feb 20 2016 20:33:10) 
  Copyright (c) 1997-2015 The PHP Group
  Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies</code></p>
  
  <ol start="5">
  <li><p><code>sudo cp /etc/php.ini.default /etc/php.ini</code></p></li>
  <li><p>Restarted apache2 using command</p>
  
  <p><code>sudo apachectl restart</code></p></li>
  </ol>
  
  <p>Still it shows the php code <code>&lt;?php phpinfo(); ?&gt;</code> when accessed from browser using url <code>http://localhost/phpinfo.php</code></p>
  
  <p>I have even tried enclosing the code above inside <code>&lt;html&gt;&lt;body&gt;</code> in which case the <code>browser screen was blank</code>.</p>