Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Problem with garbage in serialized CGI::Session files

Thread Tools

Problem with garbage in serialized CGI::Session files

Remco Gerlich
Posts: n/a
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" => "",
"_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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send files over the network using encapsulated serialized class Chris Java 16 02-28-2006 09:11 AM
serialized binary files vs Sql Server Performance.. =?Utf-8?B?RmFidWxvdXNzaXRlcw==?= ASP .Net 9 01-07-2006 05:17 AM
Templates - Garbage In Garbage Not Out C++ 1 07-25-2005 04:48 PM
storing serialized object in DB problem Marcel Balcarek ASP .Net 1 04-15-2004 10:30 PM
Saving serialized data to database problem Tommy Christian ASP .Net 0 07-25-2003 08:26 AM