Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Headers Already Sent By Error


chobo10

Recommended Posts

Hello,

 

Have read about this subject, but still not understanding, since I don't know what spaces or text can be erroneous.(I'm a newbie) Site has worked for a long time, except for my customer login area recently. Am getting these errors:

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/fusion13/public_html/catalog/account.php:1) in /home/fusion13/public_html/catalog/includes/functions/sessions.php on line 102

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/fusion13/public_html/catalog/account.php:1) in /home/fusion13/public_html/catalog/includes/functions/sessions.php on line 102

 

Warning: Cannot modify header information - headers already sent by (output started at /home/fusion13/public_html/catalog/account.php:1) in /home/fusion13/public_html/catalog/includes/functions/general.php on line 33

 

Have looked around line 102 of sessions.php. Can anyone tell me with more experience if there is an erroneous space or dash causing the fowl up in my code below? I sent a few lines before 102 just in case the error in spacing is there; 102 starts with return session_start();

 

if ($sane_session_id == false) {

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));

}

 

return session_start();

}

 

function tep_session_register($variable) {

global $session_started;

 

if ($session_started == true) {

if (PHP_VERSION < 4.3) {

return session_register($variable);

} else {

if (isset($GLOBALS[$variable])) {

$_SESSION[$variable] =& $GLOBALS[$variable];

} else {

$_SESSION[$variable] = null;

}

}

}

 

return false;

}

 

function tep_session_is_registered($variable) {

if (PHP_VERSION < 4.3) {

return session_is_registered($variable);

} else {

return isset($_SESSION) && array_key_exists($variable, $_SESSION);

}

}

 

function tep_session_unregister($variable) {

if (PHP_VERSION < 4.3) {

return session_unregister($variable);

} else {

unset($_SESSION[$variable]);

 

Any help appreciated!

Cynth

Link to comment
Share on other sites

You're looking in the wrong place for the problem.

 

Headers Already Sent

 

Click the link above for an explanation.

 

The problem is in /catalog/account.php (line 1)

 

The opening PHP tag:

 

<?php

MUST be at the very beginning of the file, no blank lines,spaces, or other characters (seen or unseen) preceding it.

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

You're looking in the wrong place for the problem.

 

Headers Already Sent

 

Click the link above for an explanation.

 

The problem is in /catalog/account.php (line 1)

 

Thank you, that worked, and I feel silly. There was a space in front of php. The good news is I learned something new. To check catalog/account.php line 1!!!!! I was too busy checking sessions.php line 102.

 

 

The opening PHP tag:

 

<?php

MUST be at the very beginning of the file, no blank lines,spaces, or other characters (seen or unseen) preceding it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...