Angus, (or anyone else)

I have already explained that I have my production and development servers.
The same code is running on both boxes.  When I say my code works, it seems
to be verified when it works on the production box.  Anyways.. here is what
happens on the  development server.  I will first outline my problems,
explain my current configuration, and then explain what I've already tried
to fix the problem to no avail.  And I have read all the documentation on
sessions that I have found including Apache::Session and the Embperl manpage
and i didn't appreciate the comment you made in your last email.

Problem:

I will start up apache.. i'll get the Sessions Enabled line in the log file.
Embperl is sending the cookies fine since they show up when client browsers
(ie: netscape with a popup dialog verifying it) hit the site.  Everything
seems to work great.  I'll browse a few pages that require sessions and then
either two problems occur.

1.) The most common is that it appears like the session dies or disappears
because I'll get thrown back to the login page and that only occurs when the
session doesn't exist.  I'll login once again and either the session won't
be created or it will last for even less then the first time.   That is one
problem.

2.) The other problem which really freaks me out is that if two developers
are working on the same machine -- sometimes I will hit some page on the
site and see HIS content.  I will then be able to access all of his
information, pages, etc.. until that session dies out like in number 1.


Current Configuration:

This is in my conf file for apache.

I'm using Apache with mod_perl built static.  I am loading Embperl at
startup.  Here are my versions.

OS is FreeBSD 4.0 Release
Perl Version: 5.005_03
Embperl version 1.2.1
Apache::Session 1.03
Apache 1.3.12
mod_perl 1.24

my apache conf

<Files "*.html">
    # set optRawInput to true and turn off escaping
    PerlSetEnv  EMBPERL_OPTIONS 16
    PerlSetEnv  EMBPERL_ESCMODE 0
    SetHandler  perl-script
    PerlHandler HTML::Embperl
    Options     +ExecCGI

    # For session
    PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
    PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions
UserName=username Password=password"
    allow from all
</Files>



I hope that is all you need, I can get you other information if you need it.


Things I've Tried:

Installing Apache::Session 1.51 to no avail even though that is the version
I use on the production.  Gerald explained in earlier emails that 1.51 won't
work with 1.2.1, but I've used it successfully before.  Nonetheless, I'm
using 1.03 right now.

I've tried all the different lockers.  Part of my problem is that I don't
understand the difference between locker types -- i've tried to find
documentation on it, but couldn't.  Anyways, I've tried NullLocker,
SysVSemaphoreLocker, FootLocker (joke), etc, but none of those work any
better.

I've also tried FileStore, etc., instead of DBIStore.  I've also tried
knocking Apache::Session back to 0.17 which also doesn't work.

Finally, Gerald once explained earlier to me to delete the semaphores using
ipcs, etc.  That also didn't work.  The problem continues.  I think about
sums up everything I've tried, but I might have missed something.


-joe



-----Original Message-----
From: Angus Lees [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 09, 2000 5:46 PM
To: Embperl list
Subject: Re: Embperl and Sessions


On Thu, Nov 09, 2000 at 03:31:58PM -0500, Joe Lauer wrote:
> my ONLY problem with Embperl were sessions and how difficult they
> were to get up and running.

i found them very easy, once you read the documentation. its only two
variables: EMBPERL_SESSION_CLASSES and EMBPERL_SESSION_ARGS, both of
which are explained in detail (with examples) in the Apache::Session
and HTML::Embperl man pages.  The problem is of course, that you can
write all the documentation you want, but people still won't read it.


> I have also had the problem of other users seeing my session after I
> login.  This is very scary and does not bode well for a robust
> scripting language.

where you using a DSO or static mod_perl? what version? where you
loading embperl at server startup?  there are several gotchas with all
this that are mentioned in the embperl manpage.

The problems i've been reporting (DeleteSession, GetSession, etc) are
features thata were only added a beta version or two ago.. i think its
perfectly acceptable for them to have a few bugs in some extreme
cases. so far gerald has fixed each of them within a day.

something which i don't think everyone realises is the contortions
that gerald goes through to support Apache::Session 0.17, 1.0x and 1.5
- each of which has quite a different api. as far as i can tell, it
all works too, which is much better backward compatibility than i
would ever have asked for.


> I believe PHP does its own session handling

well duh. the equivalent of this statement is "I believe Perl does its
own session handling" which is also true.

--
 - Gus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to