CodeIgniter Forums
Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ (/showthread.php?tid=60999)



Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 08-25-2014

[eluser]webdevron[/eluser]
I'm using addthis script to share my website pages over Facebook. Whenever I'm going to share my page there is an error message. What to do..?

Error Message:
Error
Message: Cannot modify header information - headers already sent by (output started at /home/user/app/wdr_sys/core/Exceptions.php:185)


Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 08-25-2014

[eluser]InsiteFX[/eluser]
It means that you are outputing data before sending the facebook stuff.

Check to see where you are outputting data to your webpage.



Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 08-25-2014

[eluser]webdevron[/eluser]
That is my problem.. How to find this..?


Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 08-25-2014

[eluser]InsiteFX[/eluser]
best way would be to back up from your error and use exit statements.

Also check where you are loading your views.



Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 08-25-2014

[eluser]CroNiX[/eluser]
Since the error message says output is coming from the exceptions class, you can bet you have an error in your code and it's being output to the screen. Check your php error logs.


Facebook sharing Error Message: Cannot modify header information - headers already sent by (output started at /home/wdr/ - El Forum - 09-10-2014

[eluser]cdechery[/eluser]
Quick tip to try and fix this (I had a similar problem recently).

Check your files for any blank spaces before the initial <?php at the top of the class and after the ?> at the end.