So im trying to begin a simple web page on an amazon ec2 ubuntu instance. I have apache2 installed, php, everything that is needed. When I set up my simple page it displays everything i have in the html except for the php code. Here is what I got so far.
<div id="leftdiv">
<h1> Test Inside Left Div </h1>
<br>
<?php date('m/d/y - h:i:s'); ?>
<br>
<p> Can you see the date above? </p>
</div>
Everything in the h1 tag and the p tag displays fine. But the date will not show up on the page. I have googled this extensively and all the solutions i have tried still do not work.
So far I have commented out the following in php5.conf.
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
# <IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
#</IfModule>
</IfModule>
restarted apache2 and nothing. I have added the following two lines to the apache2.conf file.
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
Restarted apache2 and nothing. The file is saved as a .php file, so not sure what else it could be. I'd rather not have to write the entire file out in php when I just want it to be a simple one or two lines of it within the html. Any help would be appreciated.