The character > in php scripts
Posted by: davidkrose (---.prod-infinitum.com.mx)
Date: January 10, 2008 08:43PM

I just installed wamp - latest version downloaded yesterday. My PHP scripts have broken. At every > in every PHP script Apache breaks back out of PHP and starts treating the code as HTML! I start all PHP with <?php and end it with ?>, but any > in between seems to break me right out of PHP. I've looked through php.ini etc. for a control parameter that might control this behavior, but I found nothing.

Options: ReplyQuote
Re: The character > in php scripts
Posted by: Fez (---.wa.bigpond.net.au)
Date: January 11, 2008 02:34AM

Could you give us an example of this code?

Options: ReplyQuote
Re: The character > in php scripts
Posted by: davidkrose (---.prod-infinitum.com.mx)
Date: January 11, 2008 09:20PM

I'm preparing a simplified script-set that will duplicate the problem. So far, simplifying a lot has eliminated the problem altogether. The original context is several thousand lines of javascript and several thousand more of PHP: much too much to ask someont to wade through, I think.

I was hoping there's some config setting I don't know about, or the like.

I'll keep at this a day or two, but then I have to lay off awhile - a trip out of the country.

Options: ReplyQuote
Re: The character > in php scripts
Posted by: davidkrose (---.prod-infinitum.com.mx)
Date: January 12, 2008 04:58AM

I found the culprit. There are about 60 files involved - this is a pretty big project - and one of them started not with <?php but rather just <? . That seems to have started a cascade of events that aren't worth going into but that ultimately led to the php processor freaking out and dashing madly through several script files interpreting them as if they were outside <$php ... ?> brackets. The text got sent to the ajax response string, and that's how it came to light. The file with the <? insead of <?php is an old stable script nobody has looked at or updated in a long time, so it was kind of a sleeper. Thank you for your reply to this missive.

Options: ReplyQuote
Re: The character > in php scripts
Posted by: yfastud (Moderator)
Date: January 12, 2008 05:51AM

You can try to enable short_open_tag in php.ini in order to use <? instead <?php

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.