Forums / Basic Configuration / Warning: Headers already sent (help needed)

Warning: Headers already sent (help needed)

Locked

Views: 1,459

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
22 May 2008, 9:11 PM
#1
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Warning: Headers already sent (help needed)

Hi.

Is there a kind soul who can help a newbie here, i am going nuts :frusty:

I get these 2 errors when i try to load my admin page


Warning: Cannot modify header information - headers already sent by (output started at /home/sites/sanookbrands.com/public_html/includes/languages/english/meta_tags.php:26) in /home/sites/sanookbrands.com/public_html/admin/includes/init_includes/init_templates.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/sanookbrands.com/public_html/includes/languages/english/meta_tags.php:26) in /home/sites/sanookbrands.com/public_html/admin/includes/functions/general.php on line 21

I did go to faq, and i found this
[
https://www.zen-cart.com/tutorials/index.php?article=87](https://www.zen-cart.com/tutorials/index.php?article=87)

but its not to much help.

/meta_tags.php:26 i do not have a line 26

my ?> is in :25 i do not have a any thing in :26

i did try and look for errors but to a newbie as me, i can not see any errors

Is there a kind person who can help me to tell me what is wrong ?

i did try to add some metatags in the .php, then suddenly i got these errors, then i did c/p from the backup i have on my pc back into meta_tags.php, still i am getting these errors, please help a newbie out here.

Below is a c/p from the meta_tags.php

<?php define('TITLE', 'removed'); define('SITE_TAGLINE', 'removed.'); define('CUSTOM_KEYWORDS', 'removed'); define('HOME_PAGE_META_DESCRIPTION', ''); define('HOME_PAGE_META_KEYWORDS', ''); define('HOME_PAGE_TITLE', ''); // usually best left blank define('META_TAG_DESCRIPTION_EZPAGE_#',''); define('META_TAG_KEYWORDS_EZPAGE_#',''); define('META_TAG_TITLE_EZPAGE_#',''); define('META_TAG_DESCRIPTION_page_name',''); define('META_TAG_KEYWORDS_PAGE_page_name',''); define('META_TAG_TITLE_PAGE_page_name',''); define('META_TAGS_REVIEW', 'Reviews: '); define('PRIMARY_SECTION', ' : '); define('SECONDARY_SECTION', ' - '); define('TERTIARY_SECTION', ', '); define('METATAGS_DIVIDER', ' '); define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,account,account_edit,account_history,account_history_info,account_newsletters,account_notifications,account_password,address_book,advanced_search,advanced_search_result,checkout_success,checkout_process,checkout_shipping,checkout_payment,checkout_confirmation,cookie_usage,create_account_success,contact_us,download,download_timeout,customers_authorization,down_for_maintenance,password_forgotten,time_out,unsubscribe,info_shopping_cart,popup_image,popup_image_additional,product_reviews_write,ssl_check'); ?>

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

22 May 2008, 11:22 PM
#2
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

Oh my god i feel stupid, the solution to my problem is here, i found this in another thread.

 Originally Posted by Website Rob  View Post 
[B]This can include spaces after the ?> at the page bottom.[/B]

:clap:

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

23 May 2008, 2:03 AM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,668
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

What are you using to edit your files? You want to use a plain text editor, not your Control Panel's File Manager or most WYSIWYG html editors.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

23 May 2008, 2:09 AM
#4
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

I did use ms-word for that, i have a backup on my pc and from there i edit the files, and then i made a c/p into the file manager.

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

23 May 2008, 2:29 AM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,668
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

MS Word is also on the list of do not use for editing php files.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

23 May 2008, 1:08 PM
#6
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

Kim:

MS Word is also on the list of do not use for editing php files.

Even when its from a backup on my pc ? I did not know that, thank you for telling me that, it can save me from many problems in the future i think.

I do not like using like notesblok when i edit files, and i never edit files online, well i try not to do so, like the space problem i had, i did fix that online and i did take a backup after the problem was fixed.

Then i must on a search for what program recommend to use when editting php files.

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

23 May 2008, 3:49 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Warning: Headers already sent (help needed)

mookmik:

Then i must on a search for what program recommend to use when editting php files.

A lot of people here use Notepad++ or Crimson Editor - both good, both free.

23 May 2008, 4:54 PM
#8
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

Thank you stevesh, that was kind of you, i am on it, i wanna try the Crimson Editor, but i will download both of them.

Darn its hard to be a newbie :wacko: so much information about php in a short time, trying figuring out how to fix "problems" on my website.

I just made a search on how to remove links, but i am not sure i did understand that very well, can some one please have a look at my site www.sanookbrands.com and advice me, how i remove this affiliate link near the right corner, i want a login link there instead if that is possible, thx in advance.

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

24 May 2008, 8:18 PM
#9
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

About removing the affiliate link in the header, i did try and remove the link from here

	<div id="top_head">
		<div id="top_head_mar"></div>
		
		<div id="top_head_first">Languages: 
		<?php			
			 if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    $lng = new language;
  }

  reset($lng->catalog_languages);

  while (list($key, $value) = each($lng->catalog_languages)) {
    echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . zen_image(DIR_WS_LANGUAGES.$value['directory'].'/images/'.$value['image'], $value['name'], '', '', '') . '</a>';
  }
?>  
		</div>
		<div id="top_head_thir">Currencies: 
		 <?=zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get')?>

<?

    if (isset($currencies) && is_object($currencies)) {

      reset($currencies->currencies);
      $currencies_array = array();
      while (list($key, $value) = each($currencies->currencies)) {
        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
      }

      $hidden_get_variables = '';
      reset($_GET);
      while (list($key, $value) = each($_GET)) {
        if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
          $hidden_get_variables .= zen_draw_hidden_field($key, $value);
        }
      }
    }

?>

     <?=zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], ' onchange="this.form.submit();"') . $hidden_get_variables . zen_hide_session_id()?>
</form>
		</div>
		<div class="clear"></div>
	</div>
	<div id="header"> </div>
	<div id="link_header">
		<ul>
			<li><a href="<?=zen_href_link(FILENAME_DEFAULT)?>" class="white_link">HOME</a></li>
			<li style="padding-left:60px;"><a href="<?=zen_href_link(FILENAME_SPECIALS)?>" class="blue_link">SPECIAL</a></li>
			<li style="padding-left:60px;"><a href="<?=zen_href_link(FILENAME_PRODUCTS_NEW)?>" class="blue_link">NEW PRODUCTS</a></li>
			<li style="padding-left:60px;"><a href="<?=zen_href_link(FILENAME_PRODUCTS_ALL)?>" class="blue_link">ALL PRODUCTS</a></li>
			<li style="padding-left:60px;"><a href="<?=zen_href_link(FILENAME_CONTACT_US)?>" class="blue_link">CONTACT</a></li>
			<li style="padding-left:60px;"><a href="index.php?main_page=shippinginfo" class="blue_link">SHIPPING</a></li>
[B]<li style="padding-left:60px;"><a href="index.php?main_page=affiliate_faq"class="blue_link">Affiliates</a></li>[/B]
			
		</ul>
	</div>
	<div id="down_mar"></div>

When i remove that in red above, the link is still there on my web page ? how can that be :dontgetit

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.

25 May 2008, 3:38 PM
#10
mookmik avatar

mookmik

New Zenner

Join Date:
May 2008
Posts:
10
Plugin Contributions:
0

Re: Warning: Headers already sent (help needed)

I found atlast the solution to remove the link i mention in my above post, after a few hours searching in the forum :smartalec: darn so easy when you know how to do :D

Do not walk in front of me, I might not follow,
Do not walk behind me, I might not lead,
But walk instead beside me and be my friend.