Topic: PHP Warning: Cannot modify header information
Heya!
I've got some problems since I put up my website on my webhost. It worked fine on my localhost.
I only changed the comment system in default.php so you comment with your website login name(worked fine on localhost)
It works to login on cutenews, but wherever I click I automatically logout and return to the login screen.
If this is about CHMOD~ 777, I couldnt chmod every file/folder. (I couldnt access cutenews at all if I did) so I only chmod comments.txt etc and the other neccessary txt/php files.
[22-Mar-2012 17:38:53 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/epicbook/public_html/beta/news/index.php:2) in /home/epicbook/public_html/beta/news/index.php on line 91
[22-Mar-2012 17:38:53 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/epicbook/public_html/beta/news/index.php:2) in /home/epicbook/public_html/beta/news/index.php on line 97
[22-Mar-2012 17:38:53 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/epicbook/public_html/beta/news/index.php:2) in /home/epicbook/public_html/beta/news/index.php on line 98
Line 91,97,98 in order:
setcookie("lastusername", $username, time()+1012324305);
setcookie("username", $username);
setcookie("md5_password", $cmd5_password);
All help is appreciated,
Soder.