Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: ie with cgi::session not showing same session id which it was set and firefox doesn't show at all

by Anonymous Monk
on Aug 23, 2013 at 09:33 UTC ( [id://1050621]=note: print w/replies, xml ) Need Help??


in reply to Re^4: ie with cgi::session not showing same session id which it was set and firefox doesn't show at all
in thread ie with cgi::session not showing same session id which it was set and firefox doesn't show at all

But don't know why still, around 6 out of 10, scenarios fails completely in browser

Well, the new code you posted you use  print $cgi->header(); but this will never prints a session cookie, CGI.pm doesn't know anything about CGI::Session, see Re: CGI::Session "cache" issue, use $session->header, otherwise there is no session . no cookie means no sessionid means no session -- it may exist on the server, but the browser doesn't know anything about it (doesn't exist)

fails completely in browser and command line mode.

how are you passing the sessionid on the commandline?

  • Comment on Re^5: ie with cgi::session not showing same session id which it was set and firefox doesn't show at all
  • Download Code

Replies are listed 'Best First'.
Re^6: ie with cgi::session not showing same session id which it was set and firefox doesn't show at all
by msinfo (Sexton) on Aug 24, 2013 at 10:43 UTC
    THANK YOU VERY MUCH, FOR HELP, EXPLANATIONS, AND REFERENCES. It worked as expected.
    my $cgi = CGI->new; my $session = CGI::Session->load() or die CGI::Session->errstr; if ( $session->is_expired ) { print "Your session timed out! Refresh the screen to start new + session!"; exit(0); } elsif ( $session->is_empty ) { $session = CGI::Session->new () or die CGI::Session->errstr; $session->expire("2h"); print $session->header(); print "<a href='called.pl'>call</a></br></br>"; print Dumper($session); } else { print $session->header(); print "session found"; print "<a href='called.pl'>call</a></br></br>"; } $session->flush();
    and
    my $cgi = CGI->new; my $session = CGI::Session->load() or die CGI::Session->errstr; print $session->header(); print $session->dump(); print "<a href='index.pl'>index</a></br></br>"; $session->flush();

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found