Ok , I work at a place where I'm not allowed to touch the php.ini file because the server serves so many websites ... However, I was told that I can display php errors through htaccess so I can debug my code because right now , my PHP screen comes blank and it's not helping .. how can I display php errors through my local htaccess file without having to access php.ini ?
3 Answers
You should use:
php_flag display_errors on
in your .htaccess file
1 Comment
Cristian Bitoi
Hmm.. also, look here stackoverflow.com/questions/6127980/…
php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on
enable PHP error logging
php_flag log_errors on php_value error_log /httpdocs/domain name/PHP_errors.log
Using htaccess, you may specify a maximum size for your PHP errors. This controls the size of each logged error, not the overall file size. Here is the general syntax:
general directive for setting max error size
log_errors_max_len integer
Ref Link : http://perishablepress.com/advanced-php-error-handling-via-htaccess/