php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61556 display_errors=stderr is treated as display_errors=on
Submitted: 2012-03-29 20:07 UTC Modified: 2012-03-30 10:26 UTC
From: peaceable_whale at hotmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.4.0 OS: Windows Server 2008 R2
Private report: No CVE-ID: None
 [2012-03-29 20:07 UTC] peaceable_whale at hotmail dot com
Description:
------------
PHP 5.4.0 running on IIS 7.5, of which the stderrMode setting has been ReturnStdErrIn500. A 500 response is expected when display_errors is set to stderr. However, a 200 response with error message is returned and instead of stderr, on is displayed in phpinfo.


Test script:
---------------
1. Set display_errors=stderr
2. Access a malformed php script
3. Look at the HTTP response code and phpinfo

Expected result:
----------------
A HTTP 500 response with error message is returned

Actual result:
--------------
A HTTP 200 response with error message is returned

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-30 10:11 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2012-03-30 10:11 UTC] yohgaki@php.net
http://jp.php.net/manual/en/errorfunc.configuration.php

display_errors is "flag" not stings.

Are you suggesting feature change? 
I suppose users should know the correct values for ini settings and check them 
using phpinfo() etc.
 [2012-03-30 10:26 UTC] peaceable_whale at hotmail dot com
According to http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors:

Value "stderr" sends the errors to stderr instead of stdout. The value is available as of PHP 5.2.4. In earlier versions, this directive was of type boolean. 

So, stderr is a supported value. This is currently a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 05:01:29 2024 UTC