2

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This seems to be issue when using php auto_loader stuff

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.