On Apache, vhosts can be configured with their own error log file, like so:

ErrorLog "my-site-log-dir/error_log.log"

How would this be done when hosting PHP under IIS?



To report errors in the Event viewer, go to your php.ini and make sure logging is on.

log_errors = On

then enable error_log to write to syslog (with is the Event Viewer on Windows machines)

error_log = syslog


If using 'shared' hosting windows hosting then you most likely have a control panel that should have some kind of logging, otherwise see method above.

  • 1
    Hi, I want to have PHP create site specific error log files in each sites directory. As you can do with ease under Apache. Not use the event log in windows. I have access to IIS, and the whole server. Ideally I'd like to do this via a setting in the web.config file for the site. – iss42 May 30 '14 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.