Bug? Syntax error halts output and doesn't display.

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Bug? Syntax error halts output and doesn't display.

Post by allspiritseve »

Ok, I thought this was a SimpleTest bug, but I suspect now its due to my php environment somehow. Basically, if I have a file, and it includes another file, and that file has a syntax error, nothing is displayed. No error, no output from that point on, nothing. As far as I can tell, php.ini error settings are normal. Nothing shows up in the apache error log. It is really <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> me off, and I don't know how to fix it, aside from reinstalling LAMP. Any ideas?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Bug? Syntax error halts output and doesn't display.

Post by Eran »

Did you check your apache error logs? if the errors are there, it means you need to set up your error reporting / display properly.
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Re: Bug? Syntax error halts output and doesn't display.

Post by allspiritseve »

pytrin wrote:Did you check your apache error logs? if the errors are there, it means you need to set up your error reporting / display properly.
Yes... nothing.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Bug? Syntax error halts output and doesn't display.

Post by Eran »

I guess reinstalling is your only option. What PHP / Apache version are you using?
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Re: Bug? Syntax error halts output and doesn't display.

Post by allspiritseve »

PHP 5.2.6/ Apache 2.2.9
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Bug? Syntax error halts output and doesn't display.

Post by Eran »

Actually, I once had the problem you are describing with the 2.2.x apache line. Since then I use only the 2.0.x branch (this is for my windows desktop development machine by the way).
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Bug? Syntax error halts output and doesn't display.

Post by Syntac »

For some silly reason, @include, @include_once, @require, and @require_once don't display anything if the target file has errors. Someone needs to fix that.
Last edited by Syntac on Thu Jan 08, 2009 4:20 pm, edited 2 times in total.
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Re: Bug? Syntax error halts output and doesn't display.

Post by allspiritseve »

Syntac wrote:For some silly reason, @include, @include_once, @require, and @require_once don't display anything if the target file has errors. Someone needs to fix that.
That's it!! I had @include in my autoload functions. If I remember correctly, I think it's because I set up a couple of folders in the include path, and couldn't find a function that would determine whether the file existed in one of those folders, without parsing the include_path and checking each one individually. I guess I will have to do that. Thanks!
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Bug? Syntax error halts output and doesn't display.

Post by Syntac »

Hey man, don't mention it. :)
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Bug? Syntax error halts output and doesn't display.

Post by Eran »

nice! :)
Post Reply