I have a bit of an outdated hosting company. I have a PHP/Apache setup.
For some reason, it keeps writing a lot to the log files. There are two log files:
access_log and error_log
I never look into the access log, so is there some apache config that can be turned on or off that would stop all writing to the access log?
And for the error_log, I get a lot of things there very randomly.
[Sun May 20 00:56:28 2012] [error] [client 92.96.145.124] PHP Notice: Undefined index: photo_path in /home/webadmin/problemio.com/html/utils/api/somefile.php on line 398
[Sun May 20 00:56:28 2012] [error] [client 92.96.145.124] PHP Notice: Undefined index: photo_path in /home/webadmin/problemio.com/html/utils/api/somefile.php on line 398
But those are notices. How can I just make it show me warnings and errors?
Thanks!!
Include one of these two at the top of the page/header and this should take care of the notices (based on what you want to see).
// Turn off all error reporting
error_reporting(0);
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
I used to face the same problem. I asked the CS about this and they simply answer that "it can't". I ended up with writing a cron script to delete those garbage files.
This variable is in use when not defined
photo_path in /home/webadmin/problemio.com/html/utils/api/somefile.php on line 398
you need to find the file. find error.