On Maandag, 20. August 2007, Martijn wrote:

> [I think this is something specific to AxKit - correct me if I'm wrong
> and I should have sent this to the mod_perl list instead. My sincere
> apologies in that case.]
>
> I'm (re)writing some old scripts for AxKit1 and realised that I could
> make my life a lot easier by setting some variables in
> $r->pnotes->('GLOBALS') upon (re)starting Apache, so that they're
> available for every request (they do change, but only occasionally).
> But when this script is running, there is no $r, so accessing it this
> way won't work. But then, the $r->pnotes->('GLOBALS') hash should be
> 'stored' somewhere, as it is shared between the various instances of
> $r that might occur. Any ideas how I can access it from a startup
> script?

I assume you are talking about the session plugin, which is indeed 
AxKit-specific, although the core of the question is not.

Good question. I think there is no Apache->request() object at that point, but 
you might try nevertheless.

A hackish way would be to use the Apache::Session modules directly and bind 
session ID '00000000000...' (32 zeroes), that's where GLOBALS is stored. You 
should not set crucial variables there, however. If those variables are 
critical for your web application, you are better off using a database.

-- 
CU
Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to