0

I'm trying to store error logs to different file than default /var/log/apache2/error.log

I tried editing php.ini with: error_log = /home/username/public_html/php_errors.log

and it was there already: log_errors = On

but still logs keep saving into default file.

Please help.

Chupacabra
  • 15
  • 3
  • Are you sure you are editing the right `ini`? – chris85 Dec 20 '16 at 00:59
  • You might have two php.ini files, one for cli and one for apache. – aconnelly Dec 20 '16 at 00:59
  • 2
    `phpinfo();` will tell you if your editing the right file –  Dec 20 '16 at 01:01
  • 2
    Have you restarted your web server's? – JohnZ Dec 20 '16 at 01:03
  • Also check permissions - both for directory and selinux – Youn Elan Dec 20 '16 at 01:22
  • I was editing `ini` in cli, now I edited the one in apache dir too and still nothing. I also tried restarting web server. @chirs85 @aconnelly @JohnZ On my dir I have username on permission and on `php_errors.log` I have `web-data` premission @YounElan – Chupacabra Dec 20 '16 at 01:54
  • Possible duplicate of [How to log errors and warnings into a file?](http://stackoverflow.com/questions/3531703/how-to-log-errors-and-warnings-into-a-file) – Maverick Dec 20 '16 at 04:20

0 Answers0