I would imagine this is a Apache child problem. I'll try to expalin:

Apache is inheritedly and relitively multi-threaded. And, depending on your configuration and such, you will expect to have many threads open at any given time. The threads are usually called 'Children' or 'Apache Children'. Each of these children are used to load pages and send the data back to the requestor.

Given this quick tutorial, it sounds to me like you are loading the LDAP user name globally to each child. Then when the user goes to the next page, the page is loaded through another child that is no longer aware of the $userid. However, in the same sense, the $userid is still defined, however in another child. Therefore, when another user comes along and loads the page, if they grab the same child as the user before them did, they would already have the $userid from the last user.

Generally speaking, this is not the best way to hold persistant session data. Mainly because Apache, and all web servers for that matter, do not have the ability to uphold any type of persistance via the net. Perhaps the best way to hold this type of information in a semi-secure and easily retrievable way is through the assignement of a cookie or other persistance mechagnism.

Answer:
Don't use Perl variables within a Child to store user session information. It will, almost certainly, be shared to different requestors as the uptime of the server continues to grow.

These might give you some more answers, too. Take a look at them in the order I've listed them:
Good Luck

---hA||ta----
print map{$_.' '}grep{/\w+/}@{[reverse(qw{Perl Code})]} or die while ( 'trying' );

In reply to Re^2: mod_perl and multiuser global variables by wazzuteke
in thread mod_perl and multiuser global variables by rsennat

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.