Hi,

you'll have to give us more background information. I hope to get you right 
but using globals to pass things between request doesn't work because you
can never tell which Apache-Child is used. This is true e.g. mp1 and mp2
with apache in prefork mode.

Take this:
1. Apache-starts and forks to Apache-Children 1 and 2
2. User1 hits Apache-Child 1 and sets the global $FOO from 0 to 1
3. User2:
3.a. hits Apache-Child 2 and $FOO is 0 because User1 has set $FOO in
Apache-Child2 or
3.b. hits Apache-Child 1 and $FOO is 1 because User1 has set $FOO to 1

When running with mp2 and worker mpm the case is slightly different:
1. Apache-starts and starts Apache-Child 1 which spawn Thread 1.1 and Thread
1.2 and Apache-Child 2 which spawn Thread 2.1 and Thread 2.2
2. User1 hits Apache-Child 1 Thread 1.1 and sets the global $FOO from 0 to 1
which is shared between the threads
3. User2
3.a. hits Apache-Child 1 Thread 1.2 $FOO is 1 because User1 has set $FOO to
1
3.b. hits Apache-Child 2 Thread 2.1 or Thread 2.2 $FOO is 0 because User1
has set $FOO to 1 in thread 1.1 and 1.2.

See:
http://perl.apache.org/docs/2.0/user/handlers/server.html#Server_Life_Cycle

Essentially this means: You'll have to store the values you want to pass
from user1 to user2 using some sort of persitence/cache system like e.g.
BerkleyDB, shm, the filesystem, a database, ... .

http://sourceforge.net/projects/perl-cache/

Hope that helps.

Tom

> Greetings,
> 
> I'm having a problem with a script when accessed by multipile users.
> The script remembers the variables used by one user and passes them on to
> another user.
> What would be the best way to avoid this? Use sessions and hold the
> variables in a uniqe hash per session?
> 
> Thank you.
> 
> 

-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to