cancel
Showing results for 
Search instead for 
Did you mean: 

Where is PHP Error log?

aenea
Grafter
Posts: 31
Registered: ‎30-07-2007

Where is PHP Error log?

Where are PHP error messages written to on the new platform?
5 REPLIES 5
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Where is PHP Error log?

PHP error messages are suppressed by default since the information exposed increases security risks. If you want to see errors you need to add

php_value display_errors 1
php_value error_reporting 32767

to .htaccess in your code development folder.
David
aenea
Grafter
Posts: 31
Registered: ‎30-07-2007

Re: Where is PHP Error log?

Thanks.
Is there any way to write this information to a an error-log file instead of displaying it inline?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Where is PHP Error log?

i haven't tried this but setting the error_log constant should do that. I think .htaccess will need to contain

php_flag log_errors 1
php_value error_reporting 32767
php_value error_log /the/full/path/to/the/error/log_file.log

You could try with display_errors also set initially as a record of what should be in the log.
David
David
aenea
Grafter
Posts: 31
Registered: ‎30-07-2007

Re: Where is PHP Error log?

Works a treat!  Smiley
Both in-line display, using display_errors, and writing to a file, using log_errors.
Many thanks.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Where is PHP Error log?

That's good to hear. Thanks for the feedback. Smiley
David
David