Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Cannot modify header information"


Fredrik.r

Recommended Posts

Posted

Hi! Need some help with header information issues.

 

When trying to save a newsletter using Newsletters I get these warnings;

 

Warning: reset(): Passed variable is not an array or object in /home/hsphere/local/home/xxx/xxx.com/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/hsphere/local/home/xxx/belleanddean.com/admin/includes/classes/object_info.php on line 18

 

Warning: Cannot modify header information - headers already sent by (output started at /home/hsphere/local/home/belleanddean/belleanddean.com/admin/includes/classes/object_info.php:17) in /home/hsphere/local/home/xxx/xxx.com/admin/includes/functions/general.php on line 119

 

 

Line 17 and 18 in object_info.php says;

 

reset($object_array);
while (list($key, $value) = each($object_array)) {

 

 

Line 119 in general.php (header('Location:')

 

function tep_redirect($url) {
global $logger;

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

header('Location: ' . $url);

if (STORE_PAGE_PARSE_TIME == 'true') {
if (!is_object($logger)) $logger = new logger;
$logger->timer_stop();
}

exit;
}

 

 

When deleting an additional image using the contribution additional images I get this error;

 

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/hsphere/local/home/belleanddean/belleanddean.com/admin/includes/functions/database.php on line 134

 

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/hsphere/local/home/belleanddean/belleanddean.com/admin/includes/functions/database.php on line 134

 

Warning: Cannot modify header information - headers already sent by (output started at /home/hsphere/local/home/belleanddean/belleanddean.com/admin/includes/functions/database.php:134) in /home/hsphere/local/home/belleanddean/belleanddean.com/admin/includes/functions/general.php on line 119

 

 

Also this time it's referring to line 199 in general.php. Anyone know what to do? I thought I should not ask this question in the contribution area since it's a general problem. Thanks!!

Posted

Also, anotoher shop uses this code in general.php but the following code doesnt work either;

 

  function tep_redirect($url) {
global $logger;

header('Location: ' . $url);

if (STORE_PAGE_PARSE_TIME == 'true') {
  if (!is_object($logger)) $logger = new logger;
  $logger->timer_stop();
}

exit;
 }

Posted

I have no idea what to do. Any help or suggestions are appreciated! The shop is going to open later today.

Posted
I have no idea what to do. Any help or suggestions are appreciated! The shop is going to open later today.

I can help with your third error message:

common problem 15

Hopefully somebody else can help with 1 and 2.

 

Tim

Posted

Thank you Tim!

 

I've checked, it doesn't seem to be any white spaces.

 

I "solved" the Additional Images issue in general.php by removing osCommerce update 051113;

 

From

 

function tep_db_input($string, $link = 'db_link') {
 global $$link;

 if (function_exists('mysql_real_escape_string')) {
return mysql_real_escape_string($string, $$link);
 } elseif (function_exists('mysql_escape_string')) {
return mysql_escape_string($string);
 }

return addslashes($string);
}

 

to

 

function tep_db_input($string) {
 return addslashes($string);
}

 

 

Frustrating to remove an osCommerce update but can't get it to work otherwise.

 

Issue with Newsletter & Subsrcibers still not solved :(

Posted

Fredrik

 

you saved me from a big headache :D

 

will removing this update cause any issues elsewhere in the store however?

Posted

In your catalog\admin\newsletters.php locate this code

 

if (empty($module)) {

 

change it to:

if (empty($newsletter_module)) {

Posted
Fredrik

 

you saved me from a big headache :D

 

will removing this update cause any issues elsewhere in the store however?

 

Hi alba! Not that I know but I can't guarantee anything. I updated all things in the osC 051113 expect two issues. There are some very useful updates in that readme file but the change in general.php I mentioned caused me error message when deleting images using "additional images" (altough it does work, they were deleted).

Posted
In your catalog\admin\newsletters.php locate this code

 

if (empty($module)) {

 

change it to:

if (empty($newsletter_module)) {

 

Thank you Mark!! Youv'e always been very helpful, I remember that you've helped me several times before with other issues! Thanks again! :)

Archived

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

×
×
  • Create New...