Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Frontpage Banner Redirect Proplem

warning: cannot modify header banner redirect

6 replies to this topic

#1 i.dgwi

  • Community Member
  • 3 posts
  • Real Name:Islam

Posted 02 May 2012, 18:02

Hi There,

I have a small problem with the banner redirect.

1. Images Appears Normal.
2. Link Appears "http://www.desert-design.com/rdirect.php/action/banner/goto/3
3. The Click Count Normal.
4. When i Click the banner Image it's Load Page With:"Warning: Cannot modify header information - headers already sent by (output started at /public_html/includes/functions/html_output.php:831) in /public_html/includes/functions/general.php on line 45"

A. From the Admin Panel i tried using links with http:// and without also index.php "Not Working'
B. banner Directory Permission "Doesn't Change Nothing Only Images Visibility"


So am looking for a Little Support... Big Thanks in Advance;)

#2 MrPhil

  • Community Member
  • 3,273 posts
  • Real Name:Phil
  • Gender:Male

Posted 02 May 2012, 18:37

Line 831 in html_output.php is way beyond the end of the stock osC file (around 400 or so lines). Do you have a lot of add-ons added to your store? Did they add code to html_output.php? You might just want to take a look at that file and see if there is anything odd at the end of it, such as blank lines or just some blank(s) after the closing ?> . Do the last 400 or so lines look like something that legitimate add-ons would have added, or were you hacked? What version of osC are you on? Don't tell me 3.0.x (one, you're in the wrong support board, and two, you shouldn't be using 3.0 anyway).

#3 i.dgwi

  • Community Member
  • 3 posts
  • Real Name:Islam

Posted 03 May 2012, 13:12

View PostMrPhil, on 02 May 2012, 18:37, said:

Line 831 in html_output.php is way beyond the end of the stock osC file (around 400 or so lines). Do you have a lot of add-ons added to your store? Did they add code to html_output.php? You might just want to take a look at that file and see if there is anything odd at the end of it, such as blank lines or just some blank(s) after the closing ?> . Do the last 400 or so lines look like something that legitimate add-ons would have added, or were you hacked? What version of osC are you on? Don't tell me 3.0.x (one, you're in the wrong support board, and two, you shouldn't be using 3.0 anyway).

No white spaces, ?> normal, and am using osCommerce Online Merchant v2.3.1 and i don't think I've been hacked.

It's started when i had an error that can't modify header Cookies Error and another one Error Cash limiter, session couldn't be sent.

They were effecting the images when you click on any image it doesn't open within the lightbox effect "Can't load images try again later" smthing like this but when i force use cookies from the session on the admin panel it's work but the warning still there so i set it to false and i add the below line to the html_output,php

session_start();
$_SESSION['start']=1;

the warning disappear and images open normal.

but the banner redirect doesn't work before or after i add this two lines it's the same error, it's seems that the banner manager doesn't save the value normal as i every time i click i see the erorr page but it does count on the banner manager as a click count.

Edited by i.dgwi, 03 May 2012, 13:14.


#4 MrPhil

  • Community Member
  • 3,273 posts
  • Real Name:Phil
  • Gender:Male

Posted 03 May 2012, 23:00

How many lines in your html_output.php? A vanilla osC 2.3.1 has only 415 lines in includes/functions/html_output.php, yet the error message says it output something on line 831. Was there over 400 lines of PHP code added before the last closing ?> and have you confirmed there are no blanks, spaces, tabs, or any other character following the las closing ?> ?

#5 i.dgwi

  • Community Member
  • 3 posts
  • Real Name:Islam

Posted 05 May 2012, 09:14

View PostMrPhil, on 03 May 2012, 23:00, said:

How many lines in your html_output.php? A vanilla osC 2.3.1 has only 415 lines in includes/functions/html_output.php, yet the error message says it output something on line 831. Was there over 400 lines of PHP code added before the last closing ?> and have you confirmed there are no blanks, spaces, tabs, or any other character following the las closing ?> ?

It was more then 400 and i replace it with the orginal html_output.php and no white spacing but it's still not working, just i need the Homepage Banner to direct you to the page when you click the image, it was working before but this happend suddnly, don't know why?

now it's giving me this error:

Warning: Cannot modify header information - headers already sent by (output started at /public_html/includes/classes/currencies.php:1) in /public_html/includes/functions/general.php on line 45

Edited by i.dgwi, 05 May 2012, 09:15.


#6 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 05 May 2012, 11:41

Click the "Headers already sent" - The definitive help link lin my siganture.

They are called "white spaces" because you usually can see them.

Edited by germ, 05 May 2012, 11:42.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#7 MrPhil

  • Community Member
  • 3,273 posts
  • Real Name:Phil
  • Gender:Male

Posted 05 May 2012, 14:35

View Posti.dgwi, on 05 May 2012, 09:14, said:

Warning: Cannot modify header information - headers already sent by (output started at /public_html/includes/classes/currencies.php:1) in /public_html/includes/functions/general.php on line 45

includes/classes/currencies.php has something on line 1, probably a space before the <?php . Also check whether there's hacker-added code on line 1.