0

I would like to disable logging (access_log and error_log) on my server. Is this possible through the function ini_set()? If it is, how do you do it?

Wahyu Kristianto
  • 8,719
  • 6
  • 43
  • 68
Viktor Svensson
  • 755
  • 3
  • 17
  • 2
    you can't disable access_log/error_log out of php cause it is a Webserver (e.g. Apache) function. You can only change PHP-Error handling. – Thomas May 12 '14 at 13:35
  • 1
    I see. I guess it's only possible to disable the errors that PHP wants to add to the error log, am I correct? – Viktor Svensson May 12 '14 at 13:46
  • yes... may there is some "hack" but that depends on your software environment. sorry. – Thomas May 12 '14 at 13:56

1 Answers1

1

Use the following code:

ini_set("log_errors", 0);
Dushyant Joshi
  • 3,672
  • 3
  • 28
  • 52