Headers already sent....
| From: | Nic Skitt | Date: | Thu, 30 Aug 2001 10:17:38 +0000 |
| Subject: | Headers already sent.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-65197@lists.php.net to get a copy of this message | ||
Hi all,
I have a bit of a confusing one here. I have two enviroments:
1) Live server
-PHP Version 4.0.3pl1 - Nov 21 2000
-Apache/1.3.12 Cobalt (Unix)
-Linux
2) Local development
-PHP Version 4.0.6
-Apache/1.3.20 (Win32)
-Windows 2000 Pro
Now on the live server everything works fine but on my dev server, certain
scripts return errors claiming that "Cannot add header information - headers
already sent by..."
Both servers have output_buffering set to off.
The pages where the issue seems to arise contain session handling code and
location headers eg:
<?
session_start();
$sid=session_id();
$uid=$HTTP_SESSION_VARS[userid];
if (!$uid){
header("location:client-login.php?validate=1");
exit();
}
?>
Anyone any ideas?? I am clean out.
Cheers
Nic