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

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

Replies are listed 'Best First'.
Re: Re: CGI.pm, CGI::Session and Cookies
by jdtoronto (Prior) on Feb 10, 2004 at 00:50 UTC
    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

      I wanted to follow up and let you know what I finally found out. There were a couple of issues.
      • I had to install CGI::Session in my local lib, and a couple of the files appeared to be truncated during the upload. I re-uploaded the files, and finally got an informative error message.
      • Only one specific directory is writeable in the hosting environment; this is not documented anywhere. When I called support, they told me they didn't even have perl/cgi available on Windows hosting. I had to point the support person to their own docs online to show otherwise. When I put the session files in the correct directory, everything worked like magic.
      Thanks again for your valuable tips.
      digger