Jump to content

[SOLVED] Won't write PHP errors to error_log


cameronjdavis

Recommended Posts

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.