From:             whistl0r+php at googlemail dot com
Operating system: Windows
PHP version:      5.2.10
PHP Bug Type:     *General Issues
Bug description:  No/empty output is send to the client when HTTP status is set 
with header()

Description:
------------
I want to create a custom error page.
In the script I set the HTTP status to the given error and want to display
a custom text.

The script will work on Linux/Unix systems and even on Windows with IIS,
but not on Windows with Apache.

I tested the current stable and snapshot releases of PHP 5.2.10 and 5.3.0.
Tested from Apache 2.0.63 to Apache 2.2.11. Tested on Windows XP, Server
2003, Vista, Server 2008 and Windows 7.

Reproduce code:
---------------
<?php
header('HTTP/1.1 404 Not Found');
echo 'My custom 404 page';


Expected result:
----------------
I expected to see a page with the text "My custom 404 page" and it's
response header with the HTTP status set to 404.

Actual result:
--------------
On any Windows system with Apache as webserver, you won't see the text "My
custom 404 page", instead each browser will show an error message based on
the HTTP status, indicating that they were unable to render the content.

In my tests it doesn't matter if you use PHP as CGI or module.

-- 
Edit bug report at http://bugs.php.net/?id=48985&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=48985&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=48985&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=48985&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=48985&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=48985&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48985&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48985&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48985&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48985&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48985&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48985&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48985&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48985&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48985&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48985&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48985&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48985&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48985&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48985&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48985&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48985&r=mysqlcfg

Reply via email to