I already set
// Don't display errors
ini_set('display_errors', 0);
// Write errors to log
ini_set('log_errors', 1);
// Error log file name
ini_set('log_errors', '/var/log/php/error.log');
but I cannot find the log file.
I also checked the php.ini file, but there isn't any error log. I cannot find directory named var/log/apache
or var/log/php
.
I'm trying to log the errors into a file, without showing it in the browser.
The problem:
I don't see the
/var/log/
directory. Instead, I found the/php/logs/
directory.I cannot log the errors without showing it on browser, even after I use the
ini_set()
function.