Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help! - Corrupt-like string stored on value session on DB


Recommended Posts

Hello to everyone.


I searched on the forum, but I couldn't find anything about it.

Sorry If I got into the wrong forum.

Thanks for all your support.


My problem is that suddenly the session value (not the session id, just the value) started to be stored in a wrong format (at least, that is what I think). In the DB, the session value is not longer being stored in its traditional format (in my webhosting):




and is being stored in this ugly format (in my webhosting):



(all in one single line. don't know why, but this codebox is wrapping the line in some way)

for example.


This causes that the admin/whos_online.php page is not showing properly. Maybe, some customers of mine are unable to buy properly too. I mean, I noticed the problem in the whos_online page, but I think this could also affect my customers' shopping experience.


Searching on php.net, I find out the serialize() function. As long as this error is occurring in my localhost's copy of the store, I tried to echo serialize($_SESSION) and then echo $val (found in catalog/includes/functions/session.php in _sess_write() function), but the values are different, almost the same but different from each other, so I don´t think I could serialize($_SESSION) as an alternative to solve my problem.


This is what I get when echo-ing serialize($_SESSION) (in my localhost):




and this is what I get when echo-ing $val (in my localhost):





So, I need to know how to store the value in the correct format, or how to pass from the serialize($_SESSION) format to the right format above.



The problem is occurring in the online store, hosted in a LAMP server.

I run osCommerce 2.2 RC1 over an Apache 2, MySQL 5, PHP 5 server.


I suspect my hosting company has upgraded something, but their support is gonna take a bit long.


Please!... Help me... If you need any additional information, please let me know.


Excuse my english :blink:


Thanks a lot in advance.




Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.

Link to comment
Share on other sites

Yes user99999999


Thanks a lot for your information. You guess right.


I tried


echo ini_get('suhosin.session.encrypt'); 



and printed 1 (so the suhosin.session.encrypt is enabled).


Now I'm trying to turn it off , or decode it. Do you know how to decode it?


I tried the ini_set to turn it off for the current script, bu it didn't work. I tried the following:


echo ini_get('suhosin.session.encrypt');

ini_set('suhosin.session.encrypt', '0');

echo ini_get('suhosin.session.encrypt');


But it printed 1 un each echo. (it seems that the hosting company is disabling ini_set() and php_value in .htaccess)


If you know something new, please let me know.


Thanks a lot again.


Best Regards,

Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 1 year later...

Post no 6 in http://www.zen-cart.com/forum/showthread.php?t=88301

(yes its the same code as OSC if you compare it)

Makes the whos online not timeout though it doesnt decode the suhosin session data.


I got my host to disable suhosin and it still doesnt store sessions properly (how it used to).


does anyone have any ideas how to make osc work with suhosin enabled ?

Link to comment
Share on other sites


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

  • Create New...