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.


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

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.