in reply to Re: mod_perl and multiuser global variables
in thread mod_perl and multiuser global variables

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' );