Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Cannot modify header information


aarondoyle

Recommended Posts

Hey guys and girls :)

 

Got a weird one that I can't figure out.

 

My site was working fine the other day. Now when I click 'my account' or try to log in as a customer I get this warning message...

 

 

Warning: Cannot modify header information - headers already sent by (output started at /home/thinkwho/public_html/includes/languages/english.php:339) in /home/thinkwho/public_html/includes/functions/general.php on line 29

 

Does anyone know what this means and how it can be fixed? I can add any code you might wanna see but I didn't know what was appropriate at first, apart from a bit from general.php which I added at the end of this post and should encompass line 29.

 

Any help would be great.

Thanks

 

:thumbsup: :D

 

 

 

 

 

<?php

/*

$Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

////

// Stop from parsing any further PHP code

function tep_exit() {

tep_session_close();

exit();

}

 

////

// Redirect to another page or site

function tep_redirect($url) {

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

}

}

 

header('Location: ' . $url);

 

tep_exit();

}

 

////

// Parse the data used in the html tags to ensure the tags will not break

function tep_parse_input_field_data($data, $parse) {

return strtr(trim($data), $parse);

}

 

function tep_output_string($string, $translate = false, $protected = false) {

if ($protected == true) {

return htmlspecialchars($string);

} else {

if ($translate == false) {

return tep_parse_input_field_data($string, array('"' => '"'));

} else {

return tep_parse_input_field_data($string, $translate);

}

}

}

 

function tep_output_string_protected($string) {

return tep_output_string($string, false, true);

}

 

function tep_sanitize_string($string) {

$string = ereg_replace(' +', ' ', trim($string));

 

return preg_replace("/[<>]/", '_', $string);

}

 

////

// Return a random row from a database query

function tep_random_select($query) {

$random_product = '';

$random_query = tep_db_query($query);

$num_rows = tep_db_num_rows($random_query);

if ($num_rows > 0) {

$random_row = tep_rand(0, ($num_rows - 1));

tep_db_data_seek($random_query, $random_row);

$random_product = tep_db_fetch_array($random_query);

}

 

return $random_product;

}

Link to comment
Share on other sites

I've searched google for a fix but it just returns a sea of pages with the exact same problem. Well I'm glad its not just me... ever if I can't fix it.

Edit /home/thinkwho/public_html/includes/languages/english.php and make sure you do not have anything before <?php and after ?>

 

<?php
// This is good
?>

 

<?php
// this is bad....
?>

HTH

 

S

Dont forget to Search. Your problem has already been fixed before.<br>

Please visit Manchester-Fireworks.com.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...