in reply to Re: Re: Re: problem with CGI::Session / DBI connection
in thread problem with CGI::Session / DBI connection

I have figured that because of my error ("Can't connect....") the session itself is not being created.
Well doesn't this give you a clue? If youare getting this error then the handle _IS NOT_ valid when you pass it in. SOmething somewhere else is possibly closing the ahndle before it is used here.
Yeah, while it does give me a clue, it doesn't lead me to the scene of crime ;-). I know it is croaking because the $dbh is not valid. I don't know why $dbh is getting clobbered. I have tried to debug by just doing stuff with $dbh (query, etc.) and it works just fine. Somewhere between creating the handle, and passing it to CGI::Session it is getting clobbered.

I too believe that CGI::Session is a fine module. It is very well documented (Kudos to the author) with clear to follow examples. The problem is obviously with my implementation/setup. And I need to find the problem. If the mailing list had been active I could have asked for help from an audience focused on CGI::Session. Right now I am floundering.

Update: Found a part of the solution! Hope this helps others in the same situation. One of my problem was that the database and its enclosing directory both had to have read/write permissions for the "Everyone" group (of which, IUSR_*, the account under which IIS runs, is a part). Further details can be found at http://support.microsoft.com/default.aspx?scid=kb;en-us;q175168. I still have to figure out why the Handle is not being passed to CGI::Session. For now, I have hardcoded the datasource and it works. But doing it the way the module expects it does not work.

  • Comment on Re: Re: Re: Re: problem with CGI::Session / DBI connection