Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP warnings cause script to halt on IIS running FastCGI

We are migrating to a new server running Windows 2003 and IIS 6. When my PHP code runs, it has a warning on a particular line (which I'm expecting at the moment but will fix shortly). However, when it hits the warning, it immediately halts processing and returns a 500 error in the HTTP header. Normally, I would expect PHP to output the warning, but continue processing the script.

Is there something in the configuration for IIS, FastCGI, or PHP that would be returning 500 errors when PHP hits a warning?

To clarify: I don't want to suppress the warnings; I want them to display. I do not want the script to stop processing on warnings.

like image 607
jlleblanc Avatar asked Jan 07 '09 14:01

jlleblanc


1 Answers

Figured out the issue. log_errors in php.ini was set to On, but error_log was unset. This was causing PHP to stop everything. After setting display_errors to on, the warnings now display so I can see where things are breaking in the output.

This thread was helpful: http://forums.iis.net/p/1146102/1856222.aspx#1856222

like image 147
jlleblanc Avatar answered Nov 06 '22 01:11

jlleblanc