Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Crashing PHP in one easy lesson (aka WTF?)
« on February 24th, 2013, 04:07 PM »
So I'm working on the language editor, and moved its templates into its own handy dandy file, ManageLanguages.template.php. And as such I'm removing the old code I don't want.

But if I remove this one div from it, see before/after shots, so you can see what was removed - just removing that div on line 319 will not generate a 500, it will simply force PHP to abort entirely with just this in the Apache error log:
Code: [Select]
[Sun Feb 24 15:03:23 2013] [notice] Parent: child process exited with status 255 -- Restarting.

I have no idea WTF is going on.

📎 crashing_php_before.png - 44.28 kB, 844x538, viewed 268 times.

📎 crashing_php_after.png - 41.99 kB, 839x527, viewed 246 times.

Re: Crashing PHP in one easy lesson (aka WTF?)
« Reply #1, on February 24th, 2013, 04:10 PM »
Weirder still, if I drop the break between the two and make it one longer echo (there used to be something in the middle that was conditional, but now removed), it works fine.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Crashing PHP in one easy lesson (aka WTF?)
« Reply #2, on February 24th, 2013, 05:28 PM »
Have you tried turning it off and on again?™

Have you tried turning off gzipping?

Is this the default php.ini in WampServer? (The one in the Apache bin folder.)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Crashing PHP in one easy lesson (aka WTF?)
« Reply #3, on February 24th, 2013, 05:38 PM »
HELLO THIS IS IT HAVE YOU TRIED TURNING IT OFF AND ON AGAIN?[1]

I stopped and restarted Apache, but I didn't fuss with gzip or anything like that, and yes it is the default php.ini. It isn't gzip related because it's causing PHP to die before it gets back to Apache.

I have no idea what causes it to fail but since I removed more of the surrounding stuff, it's fine. I've seen odd stuff like this before and I think it's just a random parser bug somewhere. :/ I'm not on the current PHP release, this is 5.3.10.
 1. Yes, I have seen the IT Crowd. Not one of the best British comedies I've ever seen but it has some great comedic moments. The 'new emergency number' still tickles me.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Crashing PHP in one easy lesson (aka WTF?)
« Reply #4, on February 24th, 2013, 05:50 PM »
I thought it could be due to gzip because it happened to me years ago, and once I disabled mod_gzip (or was it the equivalent setting in PHP...), it started working again...

Oh, now I remember, it didn't crash PHP, it just 500'ed my Apache. Don't bother.

It's really odd...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Crashing PHP in one easy lesson (aka WTF?)
« Reply #5, on February 24th, 2013, 05:52 PM »
I know there were issues a bit back with using compression and it interfering with Xcache and Xdebug, not sure if they're still issues or not, I haven't tried using the profiler lately.

But this is very unusual, hence the topic. I can only assume a parser bug, but I've seen moved on past it, heh.