in reply to Re: CGI.pm, CGI::Session and Cookies
in thread CGI.pm, CGI::Session and Cookies

If I could ++ you triple, I would. I can't believe I misunderstood the docs so completely. Thanks for pointing out my obvious problem.

digger
  • Comment on Re: Re: CGI.pm, CGI::Session and Cookies

Replies are listed 'Best First'.
Re: Re: Re: CGI.pm, CGI::Session and Cookies
by jdtoronto (Prior) on Feb 09, 2004 at 21:42 UTC
    Thank you, digger, but it is such an easy thing to do! I remember when I first tried working with CGI::Session, it took me days to get a grasp of it. The documentation is good, but is not always easily understood.

    jdtoronto

      Now that I'm getting the cookie, and the session info, I can move forward a little bit.

      Now I am not getting any files in the directory I created for the session data. I changed my session initialization line to my $session = new CGI::Session("driver:File", $q, {Directory=>"c:\\path\\to\\sessions\\"}); to use the actual Windows file path to my directory. I have tried a few permutations to this, like  {Directory=>'../sessions/'}, but still don't get my session files. Again, I get no errors, and all the dependencies appear to be in place and relatively up to date. Is there an issue with using the file driver under Windows? Or did I miss something obvious again?

      Thanks again for your insight,
      digger
        Now under Windoze I cannot help you. There shouldn't be anything major, I have a suspicion I have used this with Apache on Windows - but not recently - we don't use any Windows as servers any more.

        Write some test code to see if you can do a $session->flush, and a $session->close. The try re-opening the session again. If you can re-open it and you can retrieve the data you stored in it, then it is all working but it is simply a matter of where the file is to be found!

        The author, Sherzod Ruzmetov, does maintain a website at http://author.handalak.com and he usually answers email.

        jdtoronto