Search code examples
phperror-logging

How can I set the PHP error log on Windows?


I'm having trouble enabling error logs in the php.ini file.

Whenever I uncomment this line where the log file is stored, the Wampserver icon stays orange.

;error_log = "D:/wamp/logs/php_error.log"

I've already enabled error logging:

log_errors = On

Solution

  • You may not be editing the correct php.ini file.

    You can also set the error_log path with ini_set().

    Hmm, maybe you also should try it with file:://D:...