Reputation: 14470
I have a class file which has some buggy code e.g
else{
$stp->Object($a);
$abbr = $a->abbr;
}
asdf
}
My understanding is that php should properly display an error message e.g saying sth that "asdf" is not a class or constant etc . But as I see this peice of code crashes the server with segmentation fault , as my error log file says:
[Fri Mar 08 17:21:37 2013] [notice] child pid 8615 exit signal Segmentation fault (11)
Is it possible to configure php/apache to properly handle these errors ? Why php is failing to report the error some understandable way . I only see "The connection was reset" message in browser.
Specification: XAMPP (php 5.3.1) MAC OS 10.6 Xdebuger installed
Upvotes: 2
Views: 2796
Reputation: 1596
Apparently something is going wrong into Apache, so it can't be properly displayed because the Apache child exit.
I had some similar error once because the PHP error made a redirection to a PHP error file (ex: ErrorDocument 500), which contained the same error, so it redirect to the PHP error page and so on... making a redirection loop.
Apache kill itself to avoid the machine to go down.
You have to diagnose what is making Apache die.
To do this, install "strace", eg. on debian :
apt-get install strace
Then stop your Apache, and start it through strace :
strace -f /usr/sbin/apache2ctl
Reproduce your problem until your Apache child crash, and try to look into the strace log to find out what happened.
Hope this helped.
Upvotes: 1