Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Using CGI::Session for authentication

by rjsaulakh (Beadle)
on Jun 24, 2005 at 09:56 UTC ( #469655=note: print w/replies, xml ) Need Help??

in reply to Re: Using CGI::Session for authentication
in thread Using CGI::Session for authentication

rlucas i am too working with the same CGI::Session but i find myself no where as far as you say that
your best bet is to always, no matter what, print your header as including a cookie containing the CGISESSID (or whatever you've decided to name it).
i have reached sucess still this point i am able to print the cookie which i am sending to the user
but the problem is that on subsequest pages when i try running the same script it creates a new session rather than intiallizing the existing one . i would like to add that i am not able to fetch the cookie
i dont know whether my understanding is wrong or my handling of the code is wrong .
my code is almost similar to the one posted with this node kidly guide

  • Comment on Re^2: Using CGI::Session for authentication

Replies are listed 'Best First'.
Re^3: Using CGI::Session for authentication
by rlucas (Scribe) on Jun 24, 2005 at 21:53 UTC
    You need to find out exactly what is happening. I recommend that you begin a fresh session with cookies cleared from browser and browser set to ask you for each cookie. Also, use file-based Data::Dumper serialization (for transparency in observing file contents) in CGI::Session and clear out the session directory. (Clean initial condition) Finally, make sure to write the received cookie info to the error log so that you can tell when your app either sets (via browser asking you) or receives (via server error log) a cookie.

    Then, go to the app and observe the cookie that is set and the file that is created. Go again to the app, verify that the cookie that was set is indeed sent back, and processed properly. Verify that the same cookie gets set again with identical session ID value.

    The answer for you will be found wherever this breaks down. Good luck.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://469655]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2018-06-23 12:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.