Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

session_regenerate_id() problem


psychopath

Recommended Posts

When creating a account or trying to login to the wehhsop as a customer I get this error:

"Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/w/wahlande/www/webbutik/katalog/includes/functions/sessions.php on line 179

 

Warning: Cannot modify header information - headers already sent by (output started at /home/w/wahlande/www/webbutik/katalog/includes/languages/swedish/login.php:1) in /home/w/wahlande/www/webbutik/katalog/includes/functions/general.php on line 49"

 

I can not find the reason for this.

It´s a clean installation.

I´ve tried with PHP 5.2.17, PHP 5.3.19 and PHP 5.4.9 but still the same problem.

I also got a setup with Oscommerce 2.2 and that one works fine.

 

Any suggestions or ideas?

 

You can try to create a account at http://www.wahlanders.se/webbutik/katalog/login.php to see the error.

Link to comment
Share on other sites

Hi

Check the file at katalog/includes/languages/swedish/login.php and look for any whitespace at the head of the file before the opening <?php (maybe a space maybe a blank line) - if you find any remove it and see if that works

 

Bob

 

THANKS!

There was not whitespace at the beginning of the files but there was a blank line at the end of the files, removed it and now it works!

Link to comment
Share on other sites

Any text (even a blank) outside of <?php ... ?> PHP blocks will be immediately sent to the browser. If it's the first text of the page, it will force the HTTP headers to be flushed to the browser, no matter what state they're in. Once the headers have been sent to the page (too early), any calls to PHP's header() to set different header information will fail with the two errors you saw.

Link to comment
Share on other sites

Saving it as UTF-8, your editor probably is sticking a Byte Order Mark at the very beginning of the file. That will cause headers to be flushed to the browser too early. See if your editor has an option to "save without BOM".

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...