I have just started using Apache::Session for the first time. Whenever I try to modify the tied hash, next time I load the session I dont get the value I added to it. Is there a problem with this module or could I be doing something wrong? I've looked over my code dozens of times. Here is a snippet:
$session_id = "dd8238bed20abbbbdf26ca6bbd9d035a"; %sess = (); tie %sess, 'Apache::Session::MySQL', $session_id, { Handle => $dbh, LockHandle => $dbh }; print "NAME: $sess{name}\n"; $sess{name} = "Marc";
I previously created that session by running the code with $session_id = undef, I am now just hard coding the session id in so I access the same session. The session id is showing in the mysql database with some binary data I cant read in the asession field. The first time this code is run, my name shouldnt print out, but every time after that it should, its not. I dont think this would matter, but I added an extra field to the mysql table, the fields go id, lastmodified, and asession, where lastmodified is a TIMESTAMP. The Apache::Session version is 1.6. Also, I tried another peice of code with Apache::Session, and I just simply got a seg fault. Has anyone experienced this before? Could it have something to do with tie? Thanks! Marc

In reply to Apache::Session::MySQL not storing info, and sometimes seg faulting by marcz908

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.