Debugging Techniques |
|
2024-11-24 |
|
|
4 |
|
|
See no evil, hear no evil...
Users rarely report errors and often may not even notice the erroneous behaviour.
Therefor it is absolutely critical to log errors to ensure that is a record of the problem.
PHP's Error Logging Facility
# Inside PHP.ini
error_log = /home/vhost/logs/php_error_log
display_errors = Off
log_errors_max_len = 0
- • Since the errors are being logged there is no need to display them on screen.
- • Do not limit the error length so the error message is never cutoff.