From:             jsgoupil at lookstrike dot com
Operating system: WinXP
PHP version:      5.0.0RC2
PHP Bug Type:     Documentation problem
Bug description:  Output sent before header or setcookie

Description:
------------
In the documentation : "Remember that header() must be called before any
actual output is sent..."
We can find the same in setcookie() function.

In PHP5, when we use
header("Location: http://www.lookstrike.com";);
, the function doen't care if we sent something before.

If other function exists like that, perhaps it will do the same thing...

php.ini file : 
display_error = On
error_reporting = E_ALL

I don't know if you have to clarify the docs or if it is a function bug...

Reproduce code:
---------------
<?php
echo "A";
header("Location: http://www.lookstrike.com";); // Going to Website
?>

of

<?php
echo "A";
setcookie("TEST"); // No error
?>


-- 
Edit bug report at http://bugs.php.net/?id=28613&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28613&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28613&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28613&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28613&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28613&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28613&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28613&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28613&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28613&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28613&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28613&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28613&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28613&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28613&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28613&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28613&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28613&r=float

Reply via email to