cameronjdavis Posted January 18, 2008 Share Posted January 18, 2008 I want apache and php to write php errors to my own error_log. It half works. PHP startup errors are going to my custom log. Runtime errors/warnings etc are going into the apache error log. I want them in my custom error_log file. - I've set the error_log value to my file. - I've set log_errors = On - I've set display_errors = Off - I've set display_startup_errors = Off Is there a gotcha I don't know about it? Quote Link to comment https://forums.phpfreaks.com/topic/86591-solved-wont-write-php-errors-to-error_log/ Share on other sites More sharing options...
trq Posted January 18, 2008 Share Posted January 18, 2008 Is the file writtable by the apache process? Quote Link to comment https://forums.phpfreaks.com/topic/86591-solved-wont-write-php-errors-to-error_log/#findComment-442440 Share on other sites More sharing options...
cameronjdavis Posted January 18, 2008 Author Share Posted January 18, 2008 Funny you should say that. Technically it is and then it isn't. I have solved the issue. When apache starts php it runs as root and generates the php error file as root. PHP writes it's startup errors to the error file. Apache then changes user and can no longer write to the file. Thanks for the reply. Problem solved. Quote Link to comment https://forums.phpfreaks.com/topic/86591-solved-wont-write-php-errors-to-error_log/#findComment-442442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.