Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

CGI::Session in modperl data is inconsistent

by keenlearner (Acolyte)
on May 19, 2012 at 05:20 UTC ( [id://971387]=perlquestion: print w/replies, xml ) Need Help??

keenlearner has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I been trying to debug my code for a while. Basically, the code process are :
- create CGI::Session->new
- store value into the session
- retrieve the value from session with the session id from cookie sent by browser with CGI::Session->load($id)
- update the session value
- after update, retrieve session again with CGI::Session->load($id)
- the value returned is new value, but when reload again it becomes old value, and change alternatively with every reload
- I have also called $session->flush() function everytime when I update the session value.


I aware that apache is using different child process, but isn't that the CGI::Session value is stored into the file and retrieve from the file ? which already been shared by child processes. Or the CGI::Session retrieve from its memory which is different among the child ? How can I force the CGI::Session to retrieve from the file instead of memory ? Or how to solve this ?

Thanks
  • Comment on CGI::Session in modperl data is inconsistent

Replies are listed 'Best First'.
Re: CGI::Session in modperl data is inconsistent
by Anonymous Monk on May 19, 2012 at 06:35 UTC
      thanks, I have read some of those article, still I cant find the cause of my bug.

        You don't show any code, so we can't reproduce or diagnose your problem. Please post a short, self-contained example that reproduces the problem.

        Maybe you don't use a backend for CGI::Session that works across mod_perl instances, or you don't save the values into the session when you think it does, or you don't retrieve the values from the session when you think you do.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://971387]
Approved by naikonta
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-25 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found