On 20-05-2012 07:17, tamouse mailing lists wrote:
Are these syntax errors or run-time errors? The former won't display
to the page at all, as they abort PHP before that point. Those written
to wherever PHP is set to log errors, which might be the same as the
apache error log unless you've set something specifically for it in
php.ini.
The best way I've found to suss out syntax errors is to "lint" the
source file with php -l from the command line.
On the other hand, if they are not syntax errors, then make sure you
set error_reporting and display_errors (I also always set
display_startup_errors as well) soon enough to catch them (and that
nothing you include turns them off).
I always find it useful to check these values not by grep'ing the
php.ini file, but by checking phpinfo() output. Just make a new file with
<?php
phpinfo();
in it, and run it in the browser. That will show you the values of
display_errors and error_reporting that are actually used. I have seen
cases where the php.ini file a person thought was being used was
actually NOT used, and as such changing values inside that file had no
effect.
- Tul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php