Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a development server with Apache 2.2.8 /PHP 5.2.4 on Ubuntu Server 8.04. Sometimes my php code returns an Internal server 500 error instead of outputting the errors to the page.

The Apache error.log contains no entries regarding the 500 error and the access.log only contains the one line referencing that the 500 error occurred. In php.ini error_reporting = E_ALL and display_errors = On.

How do I get Apache or PHP to display the error on the page instead of a generic 500 error.

share|improve this question
add comment

2 Answers 2

Your google-fu fails you, small grasshopper.

http://ca3.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

share|improve this answer
    
@Ernie: Who need Google, when I've got you. Thanks! –  blunders Oct 15 '10 at 3:57
    
Note to anyone else new to php ini - error reporting must be enabled after the line engine = On, otherwise it will not work. –  Nico Burns Nov 3 '10 at 18:10
add comment

Found the issue. Developer was using someone else's library and failed to notice that the library had custom error handling code built in. Changed one line of code and all is well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.