On 23-07-2009 at 07:04:44 wallace <wall...@petrosys.com.au> wrote:

A slightly more complex problem to fix is now happening that does not
happen with phptal 1.1.7. One page appears to be in a loop as apache uses
up 100% CPU and eventually times out.

I get nothing in my apache logs, so since phptal is not reporting an error
Im not sure how I can fix this.

Can anyone suggest how I can trap the output so I can see what part of
phptal is causing a loop.

Try XDebug.

If not, try putting echo "I'm here" all over the code :)

Have any recursive functions been introduced in v1.2.0 that might point me in the right direction?

If it were caused by infinite recursion, then PHP would die quickly by stack overflow, rather than time out.

Or if anyone has any bright ideas that would be great.

Can you send me the template or its fragment that causes deadloop?

PS back on the phptal error reporting.. any chance we can have a snippet
of code from the area
where the problem occured. this would be more useful
than a line number which in some instances is 100's of lines out (Im
assuming because I use macros so it looses count).

Macros should give accurate line numbers (put phptal:debug="" in the template to get line numbers for runtime errors).
Prefilters may change number of lines.


I could add snippets for parse errors, but how would you display them?

I have problem with PHP's default exception handler that is not aware of the fact that PHP generates HTML, so it doesn't escape text properly when echoing error messages (and thus snippets) and tags from errors end up being interpreted by the browser.

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to