title: PHP is not working on Ubuntu Apache server
body: <p>I just installed php and apache server on Ubuntu 17.04 but my <code>.php</code> file doesn't work on my browser.</p>
  
  <p>index.php:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;h1&gt;Welcome!&lt;/h1&gt;
  &lt;?php
    echo "Hello World!";
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Only <code>Welcome!</code> appeared on the browser, and when I inspect the page I see php code is being commented. I have already started apache server and still have no idea what is wrong. Please help me out, thank you! </p>
  
  <p><code>$ php -v</code></p>
  
  <pre><code>PHP 7.0.15-1ubuntu4 (cli) (built: Feb 28 2017 21:33:59) ( NTS )
  Copyright (c) 1997-2017 The PHP Group
  Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
      with Zend OPcache v7.0.15-1ubuntu4, Copyright (c) 1999-2017, by Zend Technologies
  </code></pre>
  
  <p><code>$ sudo /etc/init.d/apache2 status</code></p>
  
  <pre><code>apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/apache2.service.d
             └─apache2-systemd.conf
     Active: active (running) since Tue 2017-04-25 14:38:55 +07; 10min ago
    Process: 11578 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
    Process: 11604 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 11619 (apache2)
      Tasks: 55 (limit: 4915)
     Memory: 9.7M
        CPU: 429ms
     CGroup: /system.slice/apache2.service
             ├─11619 /usr/sbin/apache2 -k start
             ├─11663 /usr/sbin/apache2 -k start
             └─11664 /usr/sbin/apache2 -k start
  
  Apr 25 14:38:55 g5080 systemd[1]: Starting The Apache HTTP Server...
  Apr 25 14:38:55 g5080 apachectl[11604]: AH00558: apache2: Could not reliably determin…sage
  Apr 25 14:38:55 g5080 systemd[1]: Started The Apache HTTP Server.
  Hint: Some lines were ellipsized, use -l to show in full.
  </code></pre>