PHP Not showing up

So I set up PHP on a new computer with windows 7 and followed the today.php script from build your own database driven website…
here is the code:
[B]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<title>Today’s Date</title>
<meta http-equiv=“content-type”
content=“text/html; charset=utf-8”/>
</head>
<body>
<p>Today’s date (according to this web server) is
<?php

echo date('1, F dS Y.');

?&gt;
&lt;/p&gt;

</body>
</html>[/B]

HTML is showing up @ http://localhost/today.php but not PHP.

What could be the issue?

Thanks

Yes I have the book. This is all I have to help me and these are the steps I have followed thus far but I am not sure where I have gone wrong. One thing though, I did remove apache from my computer in the C drive and uninstalled the program but when I downloaded the program again the httpd.conf was already filled in with the info I have previously entered which to me was kind of weird that it was not a fresh page.

Did you try out Kevin’s sample chapters that I linked to above? They might provide a useful checklist.

I have checked and double checked the configuration and I don’t see anything off.

I’m not sure what else to do…

The total code (html & php) shows in firefox. Only html shows in IE.

Now sure where I am going wrong here???

It will likely be your httpd.conf are you loading the php module? Are you associating php with .php files?

I uninstalled php and apache still my browser is not reading the php. Apache is reading the html sections of the test scripts but not php. Could it be something in the php.ini or httpd.conf or something else…Please help.

I have set this on on windows XP before and was able to work with php just fine. I emphasize that I am now using Windows 7 should it make a difference I don’t know…And I have downloaded each program MySQL, PHP and APACHE seperately.

Thanks

It’s not MySQL: that’s not responsible for parsing your PHP code, so it’s unlikely that’s causing an issue. It might be Apache that’s not setup properly: you have to make sure Apache will pass the .php requests to PHP. Did you use the Windows Installer package to install PHP, or did you use another way? I’m not that familiar in the Windows environment, but if you tell us how you’ve installed them, maybe I could help you at least in the right direction. Also, look at PHP docs on installing it for Apache 2 on Windows.

I’ll give it a go at all three…see what that does…

would that be just the PHP or all components (MySQL and Apache as well)???

I set up the programs individually. Should I unistall and use the WAMP for PC using Windows 7.

Are you running this code through MAMP / WAMP or some other server? It won’t work unless you do that.

Then it sound like it’s not set up correctly. Check the configuration again.

Could be any of them, I suspect. It is certainly easier to set everything up in WAMP, but if you want some guidance on setting things up as you have, the free chapters of Kevin’s book (I think) cover this topic in detail. You can get the free chapters here: