MyBB Community Forums

Full Version: Header error message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello I more than likely created this problem myself when trying to troubleshoot an earlier problem with the Google Analytic codes and the Header.

Now I am getting the following message as the site header. Could this be a debugger display of code?

I am running the up-to-date version.
Verified no blank lines at the beginning of "/home/user/public_html/domain.com/al/inc/languages/english/global.lang.php"
Replaced "../english/global.lang.php file from fresh download - no change.


The following warnings occurred:
Warning [2] Cannot modify header information - headers already sent by (output started at /home/apcsites/public_html/forums/index.php:1) - Line: 1548 - File: inc/functions.php PHP 5.2.12 (Linux)
File Line Function
[PHP] errorHandler->error
/inc/functions.php 1548 header
/inc/class_session.php 106 my_setcookie
/global.php 56 session->init
/index.php 18 require_once
Reupload a new copy of ./index.php from a fresh download. If you're editing this file, use something other than standard notepad. Were were you putting the Google code??
Thank you Matt! Uploading the new version of the ./index.php (not the admin/index.php) from a fresh download appears to have done the trick.

Where were you putting the Google code??

I've put the Google code in the Default Templates/ footer template as such

<br />
<div class="bottommenu">
<div class="float_right">{$lang_select}</div>
<div>
<span class="smalltext"><a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a> | <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a> | <a href="#top">{$lang->bottomlinks_returntop}</a> | <a href="#content">{$lang->bottomlinks_returncontent}</a> | <a href="<archive_url>">{$lang->bottomlinks_litemode}</a> | <a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></span>
</div>
</div>
</div>
<hr class="hidden" />
<div id="copyright">
<div id="debug"><debugstuff></div>
<!-- You may NOT remove, modify or hinder the visibility of the MyBB copyright at any time.
It must contain the links to the MyBB website and be formatted appropriately.

Failure to comply with the above will result in prosecution to the full extent of the law.
This is free software, support us and we'll support you. -->
{$lang->powered_by} <a href="http://www.mybboard.net" target="_blank">MyBB{$mybbversion}</a>, &copy; 2002-{$copy_year} <a href="http://www.mybboard.net" target="_blank">MyBB Group</a>.<br />
<!-- End copyright -->
<br />
<br class="clear" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-20");
pageTracker._trackPageview();
} catch(err) {}</script>
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
</div>
</div>