PDA

View Full Version : Headers already sent by PEAR


emil|act
Thu 15th Apr '04, 11:48am
Hi!

I got this strange problem.
I develope my sites locally, makes sure everything is working, but this time it didn't work when i put it to the external server :(

The error witch is posted on the screen is this:

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/host/lib/PEAR.php:1) in /hsphere/local/home/host/lib/login.php on line 36

Do any of you guys understand why this appear externally when it works perfect at my local computer.

Thanks in advance
-Emil

sirspot
Sat 17th Apr '04, 10:49am
It may be that the external server is not using output buffering. If that is the case, you can look up output control in the PHP manual. Here is their small example:



<?php

ob_start();
echo "Hello\n";

setcookie("cookiename", "cookiedata");

ob_end_flush();

?>

emil|act
Sat 17th Apr '04, 7:35pm
Thanks a lot =)