php code not being exectued

For some reason, when I try to view my very first php page, it displays the source code as is instead of executing it. This is what I see:

PHP Test Site <?php echo 'so who do you think you are anyway?'; ?>

I guess the problem might be some kind of configuration problem with my server? I’m using the latest version of Apache. All help is greatly appreciated.

make sure the file extension is .php and not .html

if it is .php then php is not enabled or installed on your server.

If you see the actual HTML code then the page is not even processed by your browser. This usually means the extension is wrong, as Acecool points out.

And if you see the actual HTML Code, (as opposed to the web page rendering of the html code) then there is an even bigger problem (Assuming that the extension is a VALID web extension for rendering HTML).

The code and the extension were correct.
It turns out that my test server didn’t have php properly configured, and I had to go modify the conf files once again.
Thanks for the help!

Sponsor our Newsletter | Privacy Policy | Terms of Service