Problem with garbage in serialized CGI::Session files

Discussion in 'Perl Misc' started by Remco Gerlich, Sep 29, 2004.

  1. We use PerlRun to run our site, which uses CGI::Session sessions,
    the serialized session info is stored in /tmp.

    Occasionally we get errors like this in our error log:
    [Mon Sep 27 11:57:54 2004] [error] PerlRun: `syntax error at
    (eval 20) line 1, near ";)"\n'

    This happens when CGI::Session is running eval() on the contents
    of the serialized session file, because when this happens we have
    files that look like this (sorry for the mess):

    $D = {"_SESSION_ID" => "307fdfadb1cc3be72a44d0c45fe793d9","_SESSION_ETIME" =>
    1209600,"transport" => "BU","_SESSION_REMOTE_ADDR" => "xxx.xx.xxx.xx",
    "_SESSION_CTIME" => "1096272044","Booking" =>
    ( ... deleted a lot of lines ... )
    ["03"],"to1" => [""]}, 'CGI' )}, 'Booking' ),"_SESSION_ATIME" =>
    "1096387975","_SESSION_EXPIRE_LIST" => {}};)}, 'Booking'
    ),"_SESSION_ATIME" => "1096387975","_SESSION_EXPIRE_LIST" => {}};

    In the next to last line, notice the ';)'. The ; is where the information
    ends; up to there the string parses correctly, and contains all the info
    that should be there. The syntax error occurs at the ).

    It looks like the session file used to be bigger, and then got
    overwritten with a smaller version, leaving the garbage at the end.

    Now the question: does anybody have any ideas or clues as to why
    this happens? We have no idea where to start looking.

    Thanks for any insight.

    --
    Remco Gerlich
     
    Remco Gerlich, Sep 29, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tommy Christian

    Saving serialized data to database problem

    Tommy Christian, Jul 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,276
    Tommy Christian
    Jul 25, 2003
  2. Bill Cohagan

    Measuring serialized session "size"

    Bill Cohagan, Nov 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    641
    bruce barker
    Nov 25, 2004
  3. =?Utf-8?B?RmFidWxvdXNzaXRlcw==?=

    serialized binary files vs Sql Server Performance..

    =?Utf-8?B?RmFidWxvdXNzaXRlcw==?=, Jan 6, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    637
    =?Utf-8?B?RmFidWxvdXNzaXRlcw==?=
    Jan 7, 2006
  4. Chris
    Replies:
    16
    Views:
    3,971
    Chris
    Feb 28, 2006
  5. Replies:
    1
    Views:
    451
    mrstephengross
    Jul 25, 2005
Loading...

Share This Page