4
votes

If I enable the error_log option in the php.ini file, then I get nothing in the configured error file and 'The connection to the server was reset while the page was loading.' in the browser (firefox). If I disable it, I get the error displayed in the browser.

I use PHP 5.3.0 on a Windows 7 system 64 bit.

My questions:

  1. Shouldn't the errors get displayed in the browser even if the error_log is enabled?
  2. Why is my error log file always empty?
1

1 Answers

3
votes

from php manual error_log is,

Name of the file where script errors should be logged. The file should be writable by the web server's user. If the special value syslog is used, the errors are sent to the system logger instead. On Unix, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95. See also: syslog(). If this directive is not set, errors are sent to the SAPI error logger. For example, it is an error log in Apache or stderr in CLI.

So you need to check event log and/or permission of the file where you want to log the php errors.

The error should be displayed. But looks like this is some other issue (I hope display_error is on).