On Tue, Jan 20, 2009 at 1:43 AM, Michael Depetrillo <[email protected]> wrote: > I've noticed when using the Zend_Controller package that parse errors are > not being displayed. Fatal errors seem to display fine. > > For example, if I forget a closing bracket within my class I will end up > with an empty response body and a 200 response code. > > In order to find the error I have to run the controller directly from > command line. > > /usr/bin/php app/controllers/SomeController.php > > This will give me the actual error and line number. > > Parse error: syntax error, unexpected '}' in > /Users/me/Workspace/project/trunk/app/controllers/SomeController.php on line > 67 > > Does anyone know why this would happen?
I think it's using the buffer to cache and flushes it in the end. A safe bet is to enable error logging (log_errors, error_log in php.ini) and keeping the logfile on display to fix those errors. IDEs also help with syntax highlighting and so on. Another thing is, that recent PHP installs come with display_errors = Off, maybe that's also applicable to your case. It's a security measure to not disclose to much info to the outside. However, I think it's safe to change this for a development environment. Btw, on the cli, can also run php -l for syntax errors. Till
