logo       

RE: Session not saving data files: msg#00014

Subject: RE: Session not saving data files
Mark,
Yes it was working before the UNIX server was rebuilt.
The files were written to the dir specified.
I don't know when, during or after, it doesn't matter to the script.
The files need to be there for the next call to the CGI.

-
KG
-----Original Message-----
From: Mark Stosberg [mailto:mark-WmyhgDpj2fCHT8/ATrE1yw@xxxxxxxxxxxxxxxx] 
Sent: Wednesday, September 07, 2005 4:48 PM
To: K.G. Woltz
Cc: cgi-session-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
Subject: Re: [Cgi-session-user] Session not saving data files

On Wed, Sep 07, 2005 at 04:00:38PM -0400, K.G. Woltz wrote:
> I was using CGI::Session 3.95 last week and the UNIX(Sun Solaris)
folks
> rolled out a new server and installed CGI::Session 4.02.
> Also the Perl version was 5.8.2 and now it's 5.6.1.
> Now when I use my CGI app the session data isn't saving in the dir I
> told it to.
> I tried removing the dir and the app rebuilds the dir but no data
files.
> Anyone know why I'm not saving the data?
> Here is my Perl:
>
> $sid = $query->cookie("MySesId") || undef;
> $session = new CGI::Session(undef, $sid,
> {Directory=>"$server_path/cgi-bin/session/"}) or die
> CGI::Session->errstr;

KG,

I'm sorry we broke NASA.

I think I understand the issue, but I would like opinions from other
developers about what do about it.

Files are written when the session is explicitly flushed or closed, or
automatically when the object goes out of scope.

In your example, I'm not sure either happens before the end of the
script. 

I suspect this would work for you: 

# Braces establish scope
{
 $sid = $query->cookie("MySesId") || undef;
 $session = new CGI::Session(undef, $sid,
 {Directory=>"$server_path/cgi-bin/session/"}) or die
CGI::Session->errstr;
}

Are you saying your application broke after the upgrade, because
CGI::Session 3.95 was automatically flushing your session to disk with
your
example code, but 4.02 isn't? 

    Mark





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe