Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Thanks for responding. Firstly note that I broke the code down, excluding un-related parts. I am actually sending the headers only once. Once I have printed the redirect header, I exit the script (exit(1)). Its doing everything fine, its just not registering that i'm logged in, if I visit the page in a particular way (i.e. from the homepage after logging in, or from a redirect index page).

If its doing everything fine, then why is there a problem?

redirect does not print a session cookie

No session cookie, means no session.

Your code fragment is too dense, but I was able to spot the problem (redirect without cookies)

If you follow the guidelines of How do I post a question effectively?, and post a small/short, self-contained program, which demonstrates the bug/problem, undesirable output/behaviour, we can better help you, and you can believe us when we do :)

I have used CGI:Session on many occassions, but never for such a task. I have read the tutorial, as well as the main documentation a few times. From what I gathered, you don't need to pass an SID, unless the user has i.e. cookies disabled. The module should handle everything automatically.

How do you think the module handles everything automatically?

The sid has to get passed somehow.

If you use header method, it goes by way of cookie. CGI::redirect() doesn't know about CGI::Session, so no cookie.


In reply to Re^3: CGI::Session "cache" issue by Anonymous Monk
in thread CGI::Session "cache" issue by Zhris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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: (4)
As of 2024-04-25 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found