perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peiry, Stéphane" <>
Subject RE: $udat initialisation
Date Fri, 06 Apr 2001 10:29:55 GMT

Concerning the session id, I have added the following line to my
Embperl configuration:

  # -- Log all HTTP Headers sent by the browser
  PerlSetEnv EMBPERL_DEBUG 262144

In the logs I then got my Embperl cookie:

  [23974]HDR:  Cookie=EMBPERL_UID=fc60d241d8eabde8a19e530e91020eb9

The Postgres 'sessions' DB gives me one row (id, and MIME
Base64 encode chars) as answer to the following request:

  SELECT * FROM sessions WHERE id = 'fc60d241d8eabde8a19e530e91020eb9';

and the 'sessions' table is defined as specified by Apache::Session docs
(the following shows what's in my DB, ie.: used 'pg_dump -s -t sessions

  CREATE TABLE sessions (
    id         character(32) NOT NULL,
    a_session  TEXT,

    PRIMARY KEY (id)

So cookies and session management are working fine.

The only thing that was kind of weird to me was this "second level hash"
trick: is there any documentation explaining it, or making people aware
of it?

Really I mean.. when I came with the solution of placing at the beginning
of my Embperl pages something like [- $udat{blah} = "blah" -] (or something
maybe more elegant like [- $udat{some} ||= {} -] or [- $udat{TIME} = time
and then the hole thing worked, then I just thaught, well.. go to bed .. you
must be too tired! ;-)


-----Original Message-----
From: Gerald Richter []
Sent: Freitag, 6. April 2001 02:23
To: Peiry, Stéphane;
Subject: Re: $udat initialisation

>To answer about my configuration, I have the following:

Seems to be ok, also I didn't try the Base64 on my own so far

>[14180]SES:  Embperl Session management enabled (>= 1.50)
>/usr/local/apache/bin/apachectl start: httpd started
>So I thaught everything was ok for Session management.

Should so.

>Actually this part (Embperl Configuration) then would refer to the previous
>message I posted here (ie.: 'Embperl & Postgres & Session Management'):
>that was sorted out (or so I thaught, unless you tell me otherwise):

I saw it after I have pushed the send button, sorry

>Postgres doent like the 'Storable' default and had to use 'Base64' as well
>remove some IPC stuffs hanging there from previous (default 'Storable')

>Anyway, here is all the configuration directives I have placed in my
>concerning Embperl:

>This should be ok.. ?


>All whith the same result:

Do you _exactly_ the same session id in the database, that you see in the
Embperl log ? (same length!)

>PS.: and one last thing:
>if i have a file with only:
>  [- $udat{some}{thing} = "1" -]
>it crashes (undefined HASH..), but if I use "the trick":
>  [- $udat{whatever} = "whatever" -]
>  [- $udat{some}{thing} = "1"     -]

That's a simple Perl issue and because of the way Apache::Session ties to
the hash
I would use the following, also both should work

 [- $udat{some} ||= {} -]
 [- $udat{some}{thing} = "1"     -]

How is your id field in Postgres defined ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message