views:

50

answers:

2

Hello -

I'm running Apache 2.046 with PHP 5.x and I am experiencing very odd behavior on a CodeIgniter app.

The frustrating thing is that it is not consistent.

Occasionally when I call up my app Apache returns nothing. I mean nada. But then I hit refresh and everything works as expected. Sometimes I have to hit "refreash" several times before the page will load. Other times it comes right up. When I started this post it was happening 80-90% of the time. Now I can't seem to make it happen. But it's been happening for several days so I have confidence in the next couple of page visits I will see it again.

This is on a development box that has very little traffic. When I do a PS I see several HTTP threads running - "top" reveals nothing un-expected (like a runaway process).

When I tail the apache access logs I don't even see a logged request when Apache returns blank. No Apache or PHP errors are being thrown.

I mention codeIgniter mostly because we're using the recommend .htaccess file with Mod Rewrite. So I wasn't sure if that was contributing to the issue. It also does not seem to be a problem with non-codeIgniter apps. That's hard to say with confidence since the issue is so inconsistent.

It does not seem to be client issue as we're seeing this happen from multiple client machines.

I can't tell if this is a server (hardware) issue, Apache issue or coding issue. Maybe it's a memory issue?

Any thoughts?


NEW INFORMATION:

IN the PHP log file I received this:

PHP Fatal error: fatal flex scanner internal error--end of buffer missed in /data/www/coreLib/codeIgniter/system/libraries/Hooks.php on line 226

+1  A: 

If you suspect your Rewrite rules are the source of the problem, then crank mod_rewrite's logging level up and find out. Otherwise, the fact that everything works normally outside of your app makes this sound like it's a problem with your code or possibly the framework itself.

Azeem.Butt
Thanks for the suggestion. I will do that (I didn't realize mod_rewrite had it's own logging levels). The CI app is the only one that uses mod_rewrite - so it's not definitive one way or another. I'm positive it's a coding issue - But "who's" coding issue is the question ;)
ChronoFish
+3  A: 

Blank pages when using CI are usually caused by php errors with error messages suppressed.

Try re-enabling them and reloading.

error_reporting(E_ALL|E_WARNING)
Allain Lalonde
Thanks, I pretty sure the error reporting is cranked up already - but I went ahead added your suggestion to my controller. Thanks.
ChronoFish
since the problem might lie lower down the stack, define this in your index.php file.
Allain Lalonde
good idea - thanks
ChronoFish