Problem with garbage in serialized CGI::Session files

R

Remco Gerlich

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top