php not functioning properly
Posted by: Adrian (---.patmedia.net)
Date: December 22, 2005 01:24AM

Hello,

I recently installed newest version of WAMP (which I love btw) and I encountered a problem. Whenever I try to view .php sites, the php code isnt filtered, it simply displays on the website as text.

For example, I have a file called test.php with this single line of code:

<? phpinfo(); ?>

and when I go to [<my] ip>/ and click on the file, the page it blank. When I View Source, I get the unfiltered line of php code. I didnt have this problem with previous installation of the server.

I did a clean installation of WAMP and didnt change any settings whatsoever. What could cause this problem?

Thanks in advance!


Options: ReplyQuote
Re: php not functioning properly
Posted by: Adrian (---.patmedia.net)
Date: December 22, 2005 03:57AM

Ha! I fixed my problem. I noticed that the original index.php works, with all the php scripts, so i looked deeper into my problem.

I found out that the <? tag, which I often used, has been disabled on default. I re-enabled it in php.ini file. :-)

Options: ReplyQuote
Re: php not functioning properly
Posted by: Romain Bourdon (---.w193-251.abo.wanadoo.fr)
Date: December 22, 2005 09:22AM

Yes,
it's a short_open_tags problem.

Now you should avoid using these short open tags since they are not compatible the xhtml (startup tag <?xml...)

Romain

Options: ReplyQuote
php not functioning properly
Posted by: Prajna (202.80.166.---)
Date: December 22, 2005 10:01AM

I was happy to see someone with my problem. Yeah, I too did a clean installation of wamp but while I try to view .php page the codes are displayed on the page as text. Finally I got the solution but I am still not clear regarding fixing it. I see that short_open_tag has been turned off in default. Will you please suggest me again how to enbale '<?'.

Thanks
Prajna

Options: ReplyQuote
Re: php not functioning properly
Posted by: Romain Bourdon (---.w193-251.abo.wanadoo.fr)
Date: December 22, 2005 10:05AM

IF you really want to use them, open your php.ini file (in the apache directory) and turn short_open_tags to On.

Romain

Options: ReplyQuote
Re: php not functioning properly
Posted by: Prajna (202.80.166.---)
Date: December 22, 2005 10:13AM

Thanks. Its working now.

Prajna

Options: ReplyQuote


Sorry, only registered users may post in this forum.