You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Jens Gerke <je...@gmx.net> on 2002/02/28 10:55:22 UTC

Apache module and Session

Hi,

I have a little problem with embperl and apache modules. I write an
apache-module, which starts a session with Embperl.

if ($radius->check_pwd($vars[1],$vars[2])) {
$udat = HTML::Embperl::Req::SetupSession($req_rec);
$udat->{username}="Test";
HTML::Embperl::Req::SetSessionCookie;
return OK;
}


The module send a cookie and it works for the first page, but not for the
following pages. Whats wrong and how can I start sessions from an apache
module?

ciao
jens

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Apache module and Session

Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> The module send a cookie and it works for the first page, but not for the
> following pages. Whats wrong and how can I start sessions from an apache
> module?
>

SetSessionCookie will only send the Cookie, if it is a new cookie. If it
have received a cookie, there is normaly no need to send it again. (In case
you want to, call RefreshSession before).

Gerald

P.S. If you don't execute a Embperl page within the same request, you should
call CleanupSession before leaving the handler

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org