Making separate php errors log

simba

Verified User
Joined
Oct 13, 2012
Messages
54
Hello all,

I would like to make separate logs for php errors.
currently they are /var/log/httpd/domains/domain.com.error.log
together with another errors (not found and etc.)

I tried adding error_log = /var/log/php_errors.log but after server restart errors still goes to domain.com.error.log

How could i modify it?

Thank you.
 
Please read into my problem before posting...

I stated that

I tried adding error_log = /var/log/php_errors.log

into php.ini , of course log_errors were on.

But it's not overriding. PHP errors still goes to /var/log/httpd/domains/domain.com.error.log
 
I had all these parameters set correctly.
But my log file was chmod 666. I set it to 777 and it's working now.
 
Nothing should ever have to be 777 you should fix the ownership.
 
I had all these parameters set correctly.
But my log file was chmod 666. I set it to 777 and it's working now.

As scsi has already mentioned it 666 is more than enough in your case. You don't need to chmod 777, as file should be world writable, but not executable. If to say about owner try something root:apache, or apache:apache
 
Back
Top