You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Philip Plane <ph...@cyberelves.co.nz> on 2000/03/27 23:59:15 UTC
Session Management
Hi,
I am having trouble with session management. It seems to be inconsistent on my
system. Sometimes it works, and sometimes it doesn't.
I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
Apache is set up with DBIStore SysVSemaphoreLocker.
When I set $udat{'username'} etc, I can see the data getting written into the
DB. Sometimes though, the data is not available when I try to use it on another
page.
I have one page that always works (my buyer login page), setting the data, and
using it on the next page. But another never works (my seller account creation
page). And the buyer login cookie doesn't seem to work when I look at a page in
another directory. This makes no sense to me.
I've checked packet traces to make sure the cookies are going back and forth,
and it all looks like something is being sent in the headers. I've checked the
DB to make sure the information is getting written into the sessions table.
When I turn on the debugging and look at what embperl is up to, the $udat{}
variables are undefined when embperl evals them.
Any pointers to why this may be happening?
----
Philip Plane
CyberElves
Re: Session Management
Posted by Cliff Rayman <cl...@genwax.com>.
Yes - should be no problem.
Just put the PerlSetEnv EMBPERL_* settings inside
the <VirtualHost domain.net></Virtualhost> tags for each
of the domains using cookies. The domains will NOT be able to
share the cookies however. That would be a different trick. :-)
cliff rayman
genwax.com
Aaron Johnson wrote:
> Cliff,
>
> Well what if I have 30 domains and 5 are using cookies?
> Can I set it in the VirtualHost section?
>
> Thanks for you quick reponse to the first batch of questions.
>
> Aaron Johnson
>
> Cliff Rayman wrote:
>
> > the following three settings should do it.
> > just change .genwax.com to .gina.net or the domain of the
> > server (if different).
> > my PATH applies to everything in my domain, but it can
> > apply to a subset if you desire such as /embperl/ etc..
> >
> > here are my cookie settings:
> >
> > PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
> > PerlSetEnv EMBPERL_COOKIE_PATH /
> > PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT'
> >
> > cliff rayman
> > genwax.com
> >
> > Aaron Johnson wrote:
> >
> > > Gerald,
> > >
> > > What should I set the EMBPERL_COOKIE_PATH to?
> > > Any recommended path?
> > > How does this effect the cookie versus the default?
> > > What doc/code can I read to help me understand what is going on?
> > >
> > > Aaron Johnson
> > >
> > > Gerald Richter wrote:
> > >
> > > > Hi,
> > > > >
> > > > > I am having trouble with session management. It seems to be
> > > > > inconsistent on my
> > > > > system. Sometimes it works, and sometimes it doesn't.
> > > > >
> > > > > I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
> > > > > Apache is set up with DBIStore SysVSemaphoreLocker.
> > > > >
> > > > > When I set $udat{'username'} etc, I can see the data getting
> > > > > written into the
> > > > > DB. Sometimes though, the data is not available when I try to use
> > > > > it on another
> > > > > page.
> > > > >
> > > > > I have one page that always works (my buyer login page), setting
> > > > > the data, and
> > > > > using it on the next page. But another never works (my seller
> > > > > account creation
> > > > > page). And the buyer login cookie doesn't seem to work when I
> > > > > look at a page in
> > > > > another directory. This makes no sense to me.
> > > > >
> > > >
> > > > You must set the EMBPERL_COOKIE_PATH in your httpd.conf. Browser only sends
> > > > cookie to the same directory or a dir below, until you tell them to do
> > > > otherwise.
> > > >
> > > > Does this solve your problem?
> > > >
> > > > Gerald
> > > >
> > > > -------------------------------------------------------------
> > > > 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 925151
> > > > 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
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Re: Session Management
Posted by Aaron Johnson <so...@gina.net>.
Cliff,
Well what if I have 30 domains and 5 are using cookies?
Can I set it in the VirtualHost section?
Thanks for you quick reponse to the first batch of questions.
Aaron Johnson
Cliff Rayman wrote:
> the following three settings should do it.
> just change .genwax.com to .gina.net or the domain of the
> server (if different).
> my PATH applies to everything in my domain, but it can
> apply to a subset if you desire such as /embperl/ etc..
>
> here are my cookie settings:
>
> PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
> PerlSetEnv EMBPERL_COOKIE_PATH /
> PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT'
>
> cliff rayman
> genwax.com
>
> Aaron Johnson wrote:
>
> > Gerald,
> >
> > What should I set the EMBPERL_COOKIE_PATH to?
> > Any recommended path?
> > How does this effect the cookie versus the default?
> > What doc/code can I read to help me understand what is going on?
> >
> > Aaron Johnson
> >
> > Gerald Richter wrote:
> >
> > > Hi,
> > > >
> > > > I am having trouble with session management. It seems to be
> > > > inconsistent on my
> > > > system. Sometimes it works, and sometimes it doesn't.
> > > >
> > > > I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
> > > > Apache is set up with DBIStore SysVSemaphoreLocker.
> > > >
> > > > When I set $udat{'username'} etc, I can see the data getting
> > > > written into the
> > > > DB. Sometimes though, the data is not available when I try to use
> > > > it on another
> > > > page.
> > > >
> > > > I have one page that always works (my buyer login page), setting
> > > > the data, and
> > > > using it on the next page. But another never works (my seller
> > > > account creation
> > > > page). And the buyer login cookie doesn't seem to work when I
> > > > look at a page in
> > > > another directory. This makes no sense to me.
> > > >
> > >
> > > You must set the EMBPERL_COOKIE_PATH in your httpd.conf. Browser only sends
> > > cookie to the same directory or a dir below, until you tell them to do
> > > otherwise.
> > >
> > > Does this solve your problem?
> > >
> > > Gerald
> > >
> > > -------------------------------------------------------------
> > > 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 925151
> > > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Re: Session Management
Posted by Cliff Rayman <cl...@genwax.com>.
the following three settings should do it.
just change .genwax.com to .gina.net or the domain of the
server (if different).
my PATH applies to everything in my domain, but it can
apply to a subset if you desire such as /embperl/ etc..
here are my cookie settings:
PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
PerlSetEnv EMBPERL_COOKIE_PATH /
PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT'
cliff rayman
genwax.com
Aaron Johnson wrote:
> Gerald,
>
> What should I set the EMBPERL_COOKIE_PATH to?
> Any recommended path?
> How does this effect the cookie versus the default?
> What doc/code can I read to help me understand what is going on?
>
> Aaron Johnson
>
> Gerald Richter wrote:
>
> > Hi,
> > >
> > > I am having trouble with session management. It seems to be
> > > inconsistent on my
> > > system. Sometimes it works, and sometimes it doesn't.
> > >
> > > I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
> > > Apache is set up with DBIStore SysVSemaphoreLocker.
> > >
> > > When I set $udat{'username'} etc, I can see the data getting
> > > written into the
> > > DB. Sometimes though, the data is not available when I try to use
> > > it on another
> > > page.
> > >
> > > I have one page that always works (my buyer login page), setting
> > > the data, and
> > > using it on the next page. But another never works (my seller
> > > account creation
> > > page). And the buyer login cookie doesn't seem to work when I
> > > look at a page in
> > > another directory. This makes no sense to me.
> > >
> >
> > You must set the EMBPERL_COOKIE_PATH in your httpd.conf. Browser only sends
> > cookie to the same directory or a dir below, until you tell them to do
> > otherwise.
> >
> > Does this solve your problem?
> >
> > Gerald
> >
> > -------------------------------------------------------------
> > 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 925151
> > 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Re: Session Management
Posted by Aaron Johnson <so...@gina.net>.
Gerald,
What should I set the EMBPERL_COOKIE_PATH to?
Any recommended path?
How does this effect the cookie versus the default?
What doc/code can I read to help me understand what is going on?
Aaron Johnson
Gerald Richter wrote:
> Hi,
> >
> > I am having trouble with session management. It seems to be
> > inconsistent on my
> > system. Sometimes it works, and sometimes it doesn't.
> >
> > I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
> > Apache is set up with DBIStore SysVSemaphoreLocker.
> >
> > When I set $udat{'username'} etc, I can see the data getting
> > written into the
> > DB. Sometimes though, the data is not available when I try to use
> > it on another
> > page.
> >
> > I have one page that always works (my buyer login page), setting
> > the data, and
> > using it on the next page. But another never works (my seller
> > account creation
> > page). And the buyer login cookie doesn't seem to work when I
> > look at a page in
> > another directory. This makes no sense to me.
> >
>
> You must set the EMBPERL_COOKIE_PATH in your httpd.conf. Browser only sends
> cookie to the same directory or a dir below, until you tell them to do
> otherwise.
>
> Does this solve your problem?
>
> Gerald
>
> -------------------------------------------------------------
> 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 925151
> 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
RE: Session Management
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I am having trouble with session management. It seems to be
> inconsistent on my
> system. Sometimes it works, and sometimes it doesn't.
>
> I am using Oracle 8i on RH6.0 with Apache/1.3.12 (Unix) mod_perl/1.21.
> Apache is set up with DBIStore SysVSemaphoreLocker.
>
> When I set $udat{'username'} etc, I can see the data getting
> written into the
> DB. Sometimes though, the data is not available when I try to use
> it on another
> page.
>
> I have one page that always works (my buyer login page), setting
> the data, and
> using it on the next page. But another never works (my seller
> account creation
> page). And the buyer login cookie doesn't seem to work when I
> look at a page in
> another directory. This makes no sense to me.
>
You must set the EMBPERL_COOKIE_PATH in your httpd.conf. Browser only sends
cookie to the same directory or a dir below, until you tell them to do
otherwise.
Does this solve your problem?
Gerald
-------------------------------------------------------------
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 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------