Mailing List Archive

A mod_perl content handler and ASP $Session
Hey all,

I am trying to write a mod_perl custom handler for a directory, but need
it to access the Apache::ASP $Session hash pointer - is this possible?

Thanks

Phil.
********************************************************************************Disclaimer: The information contained in this message is for the intended addressee only and may contain confidential and/or privileged information. If you are not the intended addressee, please delete this message and notify the sender; do not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the author and do not necessarily represent those of Euro Systems Projects Limited or of any of its associated companies. No reliance may be placed on this message without written confirmation from an authorised representative of the company.
Re: A mod_perl content handler and ASP $Session [ In reply to ]
Hi Phillip,

> I am trying to write a mod_perl custom handler for a directory, but need
> it to access the Apache::ASP $Session hash pointer - is this possible?

in the handler, you can create an ASP object
and the corresponding Session sub object like

..
$r->dir_config('RequestBinaryRead', 'Off');
my $ASP = Apache::ASP::new('Apache::ASP', $r, $r->filename);
$r->dir_config('RequestBinaryRead', 'On');

my $session = $ASP->Session;
..

[$r = Apache::RequestRec]

I hope, that is what you need..

Helmut


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: A mod_perl content handler and ASP $Session [ In reply to ]
Hi Phil,
>
> Your reply sounds perfect! Can you confirm that this will retrieve the
> $Session hash pointer currently being used by the user?

yes the current session, because $r contains the "session information"
(cookie)

> Essentially, I do
> not want to create a new $Session, rather retrieve information from the
> one currently in use.
>

but of course, if the session has expired meanwhile, you will create a new
one,
but to check this you can test for the existence
of a session key after the session "retrievement", that you create before..
(was that clear?)


Helmut


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: A mod_perl content handler and ASP $Session [ In reply to ]
Helmut,

Your reply sounds perfect! Can you confirm that this will retrieve the
$Session hash pointer currently being used by the user? Essentially, I do
not want to create a new $Session, rather retrieve information from the
one currently in use.

I hope I have made myself clear - and sorry if I mislead you.

Phil.





Helmut Zeilinger <hz@hzlabs.de>
15/02/2005 13:29

To
Philip_Pereira@e-s-p.com, asp@perl.apache.org
cc

Subject
Re: A mod_perl content handler and ASP $Session






Hi Phillip,

> I am trying to write a mod_perl custom handler for a directory, but need
> it to access the Apache::ASP $Session hash pointer - is this possible?

in the handler, you can create an ASP object
and the corresponding Session sub object like

..
$r->dir_config('RequestBinaryRead', 'Off');
my $ASP = Apache::ASP::new('Apache::ASP', $r, $r->filename);
$r->dir_config('RequestBinaryRead', 'On');

my $session = $ASP->Session;
..

[$r = Apache::RequestRec]

I hope, that is what you need..

Helmut
********************************************************************************Disclaimer: The information contained in this message is for the intended addressee only and may contain confidential and/or privileged information. If you are not the intended addressee, please delete this message and notify the sender; do not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the author and do not necessarily represent those of Euro Systems Projects Limited or of any of its associated companies. No reliance may be placed on this message without written confirmation from an authorised representative of the company.
Re: A mod_perl content handler and ASP $Session [ In reply to ]
Helmut,

That is BRILLIANT!!!!!!

Thanks a lot!

Phil.




Helmut Zeilinger <hz@hzlabs.de>
15/02/2005 14:42

To
Philip_Pereira@e-s-p.com
cc
asp@perl.apache.org
Subject
Re: A mod_perl content handler and ASP $Session






Hi Phil,
>
> Your reply sounds perfect! Can you confirm that this will retrieve the
> $Session hash pointer currently being used by the user?

yes the current session, because $r contains the "session information"
(cookie)

> Essentially, I do
> not want to create a new $Session, rather retrieve information from the
> one currently in use.
>

but of course, if the session has expired meanwhile, you will create a new
one,
but to check this you can test for the existence
of a session key after the session "retrievement", that you create
before..
(was that clear?)


Helmut


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
********************************************************************************Disclaimer: The information contained in this message is for the intended addressee only and may contain confidential and/or privileged information. If you are not the intended addressee, please delete this message and notify the sender; do not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the author and do not necessarily represent those of Euro Systems Projects Limited or of any of its associated companies. No reliance may be placed on this message without written confirmation from an authorised representative of the company.