Differences between revisions 1 and 2
Revision 1 as of 2007-10-29 14:34:25
Size: 1312
Editor: guest-58
Comment:
Revision 2 as of 2007-10-29 14:35:36
Size: 1313
Editor: guest-58
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
Note: where you php.ini file is located or which of the php.ini files is the used one by your apache you can find out by the PHP function phpinfo(). Include echo phpinfo() at the beginning of you php application. Note: where your php.ini file is located or which of the php.ini files is the used one by your apache you can find out by the PHP function phpinfo(). Include echo phpinfo() at the beginning of you php application.

There are several places / configurations to control error reporting and handling in PHP.

The php.ini file

Note: where your php.ini file is located or which of the php.ini files is the used one by your apache you can find out by the PHP function phpinfo(). Include echo phpinfo() at the beginning of you php application.

Some important directives (for all look [http://www.phpcenter.de/de-html-manual/ref.errorfunc.html here]):

display_errors boolean

  • This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user. For development this option should be set to "on".

log_errors boolean

  • Tells whether script error messages should be logged to the server's error log or error_log. This option is thus server-specific.

error_log string

  • 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.

CompleteSearch: completesearch/PHPErrorReporting (last edited 2007-10-29 15:35:47 by guest-58)