I've been having a TERRIBLE time trying to get Apache::Session to work. It is not as if I am having problems with only one storage subset; I can't get ANY of them to work.

First of all, I tried using Apache::Session::File. However, I recieved an error stating

TIEHASH not found in Apache::Session::File

Next, I tried Apache::Session::MySQL. After setting up the database exactly as the instructions state, I again tried to tie. Unfortunately, I recieved yet another error message; method get_lock_manager does not exist in object  at /usr/lib/perl5/site_perl/5.6.0/Apache/Session.pm line 542 After examining the source, I discovered that the suspect line in question was indeed attempting to call a method named get_lock_manager, and that it did not exist.

Finally, I tried using Apache::Session::DBI. This seemed more promising, as the error I recieved was:

Permission denied at /usr/lib/perl5/site_perl/5.6.0/Apache/Session/Sys +VSemaphoreLocker.pm line 46.
Upon examination of the code, the suspect line is:
$self->{sem} = new IPC::Semaphore($self->{sem_key}, $self->{nsems}, IP +C_CREAT | S_IRWXU) || die $!;
In particular, the permissions argument: IPC_CREAT | S_IRWXU. First of all, I don't understand why database storage needs to use Semaphores, and secondly, why it doesn't work.

I've spent oodles of time trying to get Apache::Session to work, and I am having incredible urges to simply try to roll my own in order to get the functionality I want. I am using the sample scripts included with the distribution (dBs modifed to point to actual locations, of course), so I know I am not doing anything too outrageous. Does anyone have any clue of what I am doing wrong?


In reply to Problems with Apache::Session by jryan

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.