PHP Errors disapearing, no script output

Greetings!

I’m developing a project and have run into an issue where Sometimes my web pages return an HTTP 500 Internal Server Error, no output, and nothing in application.log. I can force an error like this by opening up a class file(protected/controllers/SiteController.php for example) and inserting a random string of characters before the class definition. Instead of getting a web page about a php error i just get a completely blank page, an no hints anywhere about where the bug/crash came from.

What i’m wondering, is does anyone know what exactly is hapening here, and how to get the errors to display so i can figure out where they are coming from? I looked through the framework code a little to see if it was intentionally hiding the errors. I see there is an @include in YiiBase::autoload, but a quick test of removing the @ doesn’t bring an error display up so must be something else.

Opening up a connection with telnet to the web server and requesting the page outputs the following




~$ telnet localhost 80

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

GET /nmtdvr/nmtdvr.php HTTP/1.0


HTTP/1.0 500 Internal Server Error

Connection: close

Status: 500 Internal Server Error

X-Powered-By: PHP/5.2.4-2ubuntu5.6

Content-type: text/html

Date: Tue, 21 Jul 2009 19:21:09 GMT

Server: lighttpd/1.4.19


Connection closed by foreign host.



Thanks a bunch for any pointers

journey4712

I have also noted that with certain errors deep inside your code Yii will just "crash" saying nothing.

Maybe you could write a minimal example which shows the problem?

Can you reproduce this behavior with apache too? in case you already have an apache in your system, just copy the yii project and try to reproduce it. My guess is that your php-cgi wrapper dies and lighttpd reports the 500 error, nothing to do with the framework code.

Just a thought …