Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^8: CGI and persistent data

by astroboy (Chaplain)
on Sep 01, 2009 at 21:19 UTC ( #792736=note: print w/replies, xml ) Need Help??


in reply to Re^7: CGI and persistent data
in thread CGI and persistent data

I'm not sure this will solve the OP's problem. If the FastCGI program saves its state to some global variables between requests, the next request might be from a different user. I think you'll still need to maintain session state that will be tied to a specific user

Replies are listed 'Best First'.
Re^9: CGI and persistent data
by bv (Friar) on Sep 01, 2009 at 22:31 UTC

    True, you'll need to maintain session state yourself. A trivial example (that has plenty of bugs):

    print "<p>Hello, ", $session{$cookie}->{name}, ", welcome back</p>"
    print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://792736]
help
Chatterbox?
[Corion]: Discipulus++ # being well is like being earnest
[marto]: hopefully next year I'll be in a position to go to Perly things in Europe :)
[Corion]: Maybe I'll use the Real Jekyll a bit to get a feel for how it actually works, and to get annoyed by it ;)
[Corion]: marto: That would be cool :) There is no kids care at Perly events unfortunately, so it's not entirely family friendly
[Corion]: I think I should define a set of (say) five projects through which I rotate from time to time, just to prevent myself from being bored/annoyed by the problems they get stuck in ;)
[marto]: Corion, not bringing the kids would make it ideal :P
[marto]: a suggestion, have one project in the list that isn't programming/perl related
[Corion]: marto: Yeah, things are more parent-friendly the way they are ;))
[marto]: some hardware/makey thing
[Corion]: marto: Ah, I'm currently drifting to that again, over"painting" (well with Inkscape) one of my photographs and thinking about vectorizing some other images ...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-07-27 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (404 votes). Check out past polls.