note 54110 added to function.error-reporting
| From: | alex at modem-help dot com | Date: | Fri, 24 Jun 2005 00:22:02 +0000 |
| Subject: | note 54110 added to function.error-reporting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90867@lists.php.net to get a copy of this message | ||
Centos4 (Apache/2.0.52, php-4.3.9)
Maintaining development + production sites side-by-side is possible. Obviously, the production site
wants all error-reporting display switched off, whilst the development site is the total reverse.
Unfortunately, the php.ini file is global.
Using `ini_set("display_errors","1");' is not possible (ref: 12-Feb-2005
12:28 below) as any fatal errors in the script mean that it (and included scripts) never get acted
upon (see php.net/manual/en/ref.errorfunc.php#ini.display-errors).
Unfortunately the suggestion from Fernando Piancastelli (ref: 13-Dec-2004 09:23) did not work for me
either. The following *did* work, and allows parse-errors to be displayed on the development site:
php.ini:
error_reporting = ~E_ALL
display_errors = Off
display_startup_errors = Off
within an Apache Virtual Host in httpd.conf:
php_flag display_errors on
php_flag display_startup_errors on
php_value error_reporting 2047
The above *should* be surrounded with `<IfModule mod_php4.c> ... </IfModule>' but
that did not work either.
----
Manual Page -- http://www.php.net/manual/en/function.error-reporting.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54110
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54110&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54110&report=yes
Search -- http://master.php.net/manage/user-notes.php