Advertisement:

Author Topic: 2: session_start(): Failed to decode session object. Session has been destroyed  (Read 3111 times)

Offline Kiriakos GR

  • Jr. Member
  • **
  • Posts: 192
  • Gender: Male
    • @ITTSB_EU on Twitter
Out of the blue, I got logged five incidents with error :  2: session_start(): Failed to decode session object. Session has been destroyed



http://www.ittsb.eu/forum/index.php?topic=1205.0

2: session_start(): Failed to decode session object. Session has been destroyed

File: /home/xxxxxx/public_html/forum/Sources/Load.php
Line: 2526

Code Line this is :
   // While PHP 4.1.x should use $_SESSION, it seems to need this to do it right.
   if (@version_compare(PHP_VERSION, '4.2.0') == -1)
      $HTTP_SESSION_VARS['php_412_bugfix'] = true;

   // Set the randomly generated code.
   if (!isset($_SESSION['session_var']))
   
      $_SESSION['session_value'] = md5(session_id() . mt_rand());
   ------>     $_SESSION['session_var'] = substr(preg_replace('~^\d+~', '', sha1(mt_rand() . session_id() . mt_rand())), 0, rand(7, 12));


Any ideas of what possibly one Guest did so this log entry to be generated ?    
SMF 2.0.14


Offline NekoSensei

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
  • SMF User
    • Le Pays Du Manga et des Cartoons oubliés
Can be the same problem as me here https://www.simplemachines.org/community/index.php?topic=554292.0
But I have the impression that they do not have any solutions at the moment :)

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,182
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
I have come across the same issue on a test site which I am attempting to resolve.

Does the error log show these entries from a user that is void of an IP address?

What version of PHP are you using for that environment?
« Last Edit: June 11, 2017, 11:37:50 AM by Chen Zhen »

My SMF Mods & Plug-Ins

WebDev
Simple Portal Support

Request politely & demand nothing.