PHP not rendering on localhost
Posted by: thephatp (---.austin.res.rr.com)
Date: March 07, 2007 07:03PM

Hi, I'm new to running PHP and Apache on my local box. Usually, I write code and post it to my host to test it out. That's become a real pain, so I'm trying to get this set up locally.

I've installed WAMP, and I set the DocumentRoot folder to "D:/Websites" (instead of the default "C:\wamp\www"winking smiley. When I launch a "testphp.php" file (which only has the text "<? phpinfo() ?>"winking smiley, nothing is presented. The page is blank. I've tried other files as well, and it seems as though the pages are not being processed.

What settings might I have missed? What else needs to be out of the box to get this to work?

Thanks for the help!!

Chad


Options: ReplyQuote
Re: PHP not rendering on localhost
Posted by: CyberSpatium (71.237.217.---)
Date: March 10, 2007 10:51PM

you are using short asp style php tags, you need to use full php tags. so change:
<?
phpinfo()
?>

to:
<?php
phpinfo();
?>

Options: ReplyQuote
Re: PHP not rendering on localhost
Posted by: thephatp (---.austin.res.rr.com)
Date: March 13, 2007 02:36AM

Brilliant! That did it! I didn't realize I had to use the full tag.

THANKS!!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.