Help me please.....

I have a kind of predicament! I created a site that is using Apache::Session::MySQL, it works very well. Then I created another, that works too. So I now created a third, that uses the very same scripts, and it worked too, but now it does not work.

Here is what it is doing....
It is creating the _session_id;
It is also creating the cookie and passing it to the browser;
The browser then passes it back and forth to the site no matter what page you visit, I verified that it is not merely creating a different session for every page. it is remembering the session "id" from page to page. However, it will not store any data into it;
When I "login" on the other sites, it keeps me logged in until I click logout, then it deletes the cookie and the session. On this site, when I login and change pages, it says I'm NOT logged in! so I go login, and it says I was successfully logged in, and it does get my real name out of the 'registered_users' MySQL database, as well as the last time I logged in. It displays those for me.
So I know it works, because when I have it log me in, when it shows it is successful, it is first checking the $sess_ref->attr("login") to make sure it is set to 1, if it is, then it knows I was successfully logged in. But if it is not then it says something went wrong, but I never get that message, it always says I was successfully logged in.

So why does it "lose" the information when I leave the page, using the same session_id? The Cookie stays in tact.
Oh yeah, I also have the site check to see if the user does not have cookies turned on, if not then the site adds &sess_id=$sess_id to every link, after the ?pg=page_name. So I forced my browser to reject the cookie, and started a brand new session, which was then added to every link at the end of the link, and every form as a hidden field.
So I did make sure it was in everything I went to, and when I logged in, it again said successful, but when I changed pages, with the same sess_id added to the link, it again, said I was not logged in, so I know that the sessions are somehow not working(holding session variables).

I deleted the sessions table and recreated it, but it's not working. I'm sooooo lost. I learned these things(Apache::Session) from the book, "Perl and MySQL for the Web" by Paul DuBois. I cannot find any help with the Apache::Session module, the docs don't have any kind of trouble shooting, and no site or list to get help. Can someone, PLEASE help me, or point me in the right direction?

I would really appreciate the help.
Thank you, very much for any help you can be!

Richard.

In reply to Please help me... Apache::Session::MySQL by Anonymous Monk

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.