You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Eitan Suez <ei...@anythingovernight.com> on 2000/12/21 01:40:08 UTC

question regarding setting up session using oracle store..

hi,

  i have been trying to setup embedperl (v1.3) with Apache::Session (v1.53).
  i have written test scripts to ensure that Session.pm works using Oracle.
  i have successfully stored serialized session information using oracle
  with these scripts.

  i have also successfully gotten file based session stores to work with
  embedperl.

  but i cannot get an oracle store to work with embperl.

  these are the values i'm using for the 2 environment varialbes that
embedperl
  needs:

$ENV{EMBPERL_SESSION_CLASSES} = "Oracle Null";
$ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:Oracle:conn_info UserName=xyz
Password=abc Commit=1";

  i've tried different value for session_classes including:  Oracle Null,
Oracle File, Oracle Semaphore
   to no avail.

  i've also tried two variations of embperl_session_args:
"DataSource=dbi:Oracle:conn_info UserName=xyz Password=abc Commit=1";
"DataSource=dbi:Oracle:conn_info UserName=xyz Password=abc";

  i am guessing that my problem is with the value for session_classes.  the
documentation says
  that the value is a space separated list of (1) the store class name and
(2) the lock manager class
  name.  I verified that Oracle and Null are valid stores and lock managers
respectively.

  the behavior that i am noticing is this:
   1. when hitting a page that sets a key-pair into %udat, a cookie is set.
when reloading that
  page, a new cookie is set (this should not happen).
   2. when hitting a second page that tries to read the key pair back from
%udat, it can't find
    it.

thanks in advance for your help..

/ eitan suez
  austin, texas


Re: question regarding setting up session using oracle store..

Posted by Gerald Richter <ri...@ecos.de>.
BTW. Which Perl version do you use ?


> hi,
> >
> > $ENV{EMBPERL_SESSION_CLASSES} = "Oracle Null";
> > $ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:Oracle:conn_info
UserName=xyz
> > Password=abc Commit=1";
> >
>
> This look's ok to me
>
> >
> >   i am guessing that my problem is with the value for session_classes.
>
> This seems ok to me
>
> >
> >   the behavior that i am noticing is this:
> >    1. when hitting a page that sets a key-pair into %udat, a cookie is
> set.
>
> so basic session handling seem to work
>
> > when reloading that
> >   page, a new cookie is set (this should not happen).
>
> yes, of course
>
> Did you run your test script also under mod_perl or from the command line?
>
> Can you access your Oracle database within a Embperl page by normal DBI ?
>
> Using Oracle under mod_perl you need to make sure the ORACLE_HOME is set
for
> your web pages (i.e. with PerlSetEnv, PerlPassEnv)
>
> 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
> -------------------------------------------------------------
>
>



Re: question regarding setting up session using oracle store..

Posted by Gerald Richter <ri...@ecos.de>.
hi,
>
> $ENV{EMBPERL_SESSION_CLASSES} = "Oracle Null";
> $ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:Oracle:conn_info UserName=xyz
> Password=abc Commit=1";
>

This look's ok to me

>
>   i am guessing that my problem is with the value for session_classes.

This seems ok to me

>
>   the behavior that i am noticing is this:
>    1. when hitting a page that sets a key-pair into %udat, a cookie is
set.

so basic session handling seem to work

> when reloading that
>   page, a new cookie is set (this should not happen).

yes, of course

Did you run your test script also under mod_perl or from the command line?

Can you access your Oracle database within a Embperl page by normal DBI ?

Using Oracle under mod_perl you need to make sure the ORACLE_HOME is set for
your web pages (i.e. with PerlSetEnv, PerlPassEnv)

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
-------------------------------------------------------------