Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home93c/sub006/sc36756-TMHW/xxxxx.com/onarter/index.php:8) in /mounted-storage/home93c/sub006/sc36756-TMHW/site.com/onarter/init.php on line 42. How can I get rid of this problem?

3 Answers
3

You are trying to send a cookie after headers have already been sent (and by headers, I mean anything) - this also covers the header() in the code further down. Anything sent to the user and it borks it as well.

The header() function only works when nothing else has been done by your script. You are setting cookies in your script, which sends headers to the user, and later you are trying to send headers again.