The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Cannot modify header information - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Cannot modify header information (/showthread.php?tid=332)



Cannot modify header information - venedude - 11-03-2016

Ok so ever since I upgraded from 4.1.5 to 4.1.7b and eventually 4.1.8b I'm getting a "Cannot modify header information" warning on logout and register pages. I tried pretty much starting from zero with 4.1.8b, except init.php and same DB, without much success.

I tried to track it down but have had no luck. Any ideas?

.../users/logout.php
Warning: Cannot modify header information - headers already sent by (output started at /home/sms/public_html/dev1/usersc/includes/analytics.php:26) in /home/sms/public_html/dev1/users/classes/Cookie.php on line 30

.../users/join.php
Warning: Cannot modify header information - headers already sent by (output started at /home/sms/public_html/dev1/users/helpers/helpers.php:199) in /home/sms/public_html/dev1/users/join.php on line 208



Cannot modify header information - mudmin - 11-03-2016

I've got that on the list for a 4.1.8c fix. Sorry about that I missed that bug on the 4.1.8 release because it doesn't happen on my system.


Cannot modify header information - venedude - 11-03-2016

No problem, this one is above my skill level so any help is appreciated hehe.


Cannot modify header information - dan - 11-04-2016

I spent a few days dealing with header issues on userspice 3 because every server reacts differently. I'll definitely get to this. I have a few little things to cleanup.


Cannot modify header information - mudmin - 11-06-2016

I'm not getting these errors on 4.1.8. Can you tell me what kind of server you're using?


Cannot modify header information - mudmin - 11-06-2016

Ok. I got it. I know the problem. I fixed it in 4.1.8c (which is about to be released).

I accidentally used the wrong commenting style on analytics.php and that was putting blank space in your header, causing the error.

Try replacing your usersc/includes/analytics.php with the contents of this file.

http://pastebin.com/NER1eV6E


Cannot modify header information - venedude - 11-07-2016

Thanks! looks like removing the script tags resolved the issue. Were do you think the best place for that analytics code is now?


Cannot modify header information - dan - 11-09-2016

That is still the right place to put it. I just accidentally left some plain text in the middle of the script tags and caused the error.