Unable to display php
Posted by: avo (---.server.ntli.net)
Date: April 13, 2006 08:23AM

Hi All


Can anyone help me please !

i have installed wamp with no probs if i drop a html file in the root directory it works fine but when i drop php file in the root directory it will not display the php correct it displays it as code but the html within the php displays fine .


Any ideas please.

Thankyou in advance.

Options: ReplyQuote
Re: Unable to display php
Posted by: benichu (---.217-37-24.mc.videotron.ca)
Date: April 13, 2006 02:13PM

You probably have short php tags in your code....

Go to "Config Files", "php.ini" and change this in order to be able to use the regular (<?php) or short php tags (<?):
from:
short_open_tag = Off
to
short_open_tag = On



Ben

Options: ReplyQuote
Re: Unable to display php
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 13, 2006 06:15PM

no, this is not a php tag issue.

It seems like I answer this exact same support question every day. A simple search would have shown this question answered many times already.

Avo, if you open that php file directly using your browser, then the code does not get parsed by apache. you need to access the file using its web address so apache can parse it. Since static regular html files have not code to parse, they can be accessed locally with no problems, but php code needs to be parced, so it will just display the code.

make sure you access the file using this address with your bbrowser:
[localhost]

do not open the file locally with your browser, just type that address in the address bar of your browser and surf to the file.



Post Edited (04-13-06 18:24)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: Unable to display php
Posted by: avo (---.server.ntli.net)
Date: April 13, 2006 07:16PM

Hi

Thankyou this has stopped my prob it was the tag issue

thank you .

Options: ReplyQuote


Sorry, only registered users may post in this forum.