Another interesting find.
I just went to clients.domain.com
Refreshed a few times, access other.domain2.com, then went back to clients.domain.com
and BAM...the session changed. The new ID that should be in the clients database, was
actually in other.domain2.com's database.
I had added EMBPERL_DEBUG 16 to each virtual and logged each virtual to a separate log
file.
So, I check the clients.domain.com log, and do not see the request in there.
However, it is in the other.domain2.com log! It's really weird through, because key
ENV settings show that I actually requested clients.domain.com....yet Apache or
something interpreted it as other.domain2.com (or at least logged it in that Virtual's
log file)...yet I got the proper HTML output from clients.domain.com.
Here's the log, I went to clients.domain.com, yet it shows up in the log for
other.domain2.com!!!
[18479]ENV: EMBPERL_LOG=/tmp/embperlClients.log
Yet it showed up in the embperlOther.log file!
Could this possibly be a Apache/ModPerl problem?
Here's the entire snapshot of that request:
[18479]MEM: Load /disk1/www/Clients/index.epl in HTML::Embperl::DOC::_3
[18479]CACHE: New File for '/disk1/www/Clients/index.epl' (4b6580) in
'HTML::Embperl::DOC::_3' hash cache-key '/disk1/www/Clients/index.epl'
[18479]REQ: Embperl 1.3.1 starting... Fri Mar 16 16:15:59 2001
[18479]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[18479]REQ: Package = HTML::Embperl::DOC::_3
[18479]ENV: EMBPERL_SESSION_CLASSES=MySQL MySQL
[18479]ENV: QUERY_STRING=
[18479]ENV: SERVER_ADDR=192.168.1.11
[18479]ENV: HTTP_ACCEPT_LANGUAGE=en-us
[18479]ENV: SERVER_PROTOCOL=HTTP/1.1
[18479]ENV: TZ=US/Eastern
[18479]ENV: HTTP_CONNECTION=Keep-Alive
[18479]ENV: SERVER_SIGNATURE=<ADDRESS>Apache/1.3.14 Server at clients.domain.com Port
80</ADDRESS>
[18479]ENV: PATH_TRANSLATED=/disk1/www/Clients/index.epl
[18479]ENV: REMOTE_PORT=4949
[18479]ENV: HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
[18479]ENV: HTTP_ACCEPT=*/*
[18479]ENV: HTTP_HOST=clients.domain.com
[18479]ENV: GATEWAY_INTERFACE=CGI-Perl/1.1
[18479]ENV: SERVER_SOFTWARE=Apache/1.3.14 (Unix) PHP/4.0.4pl1 mod_perl/1.24
mod_ssl/2.7.1 OpenSSL/0.9.6
[18479]ENV: [EMAIL PROTECTED]
[18479]ENV: REMOTE_ADDR=192.168.1.125
[18479]ENV: EMBPERL_COOKIE_PATH=/
[18479]ENV: SCRIPT_NAME=/index.epl
[18479]ENV: SERVER_NAME=clients.domain.com
[18479]ENV: HTTP_ACCEPT_ENCODING=gzip, deflate
[18479]ENV: DOCUMENT_ROOT=/disk1/www/Clients
[18479]ENV: EMBPERL_LOG=/tmp/embperlClients.log
[18479]ENV: REQUEST_URI=/
[18479]ENV: MOD_PERL=mod_perl/1.24
[18479]ENV: EMBPERL_SESSION_ARGS=DataSource=dbi:mysql:database UserName=username
Password=password LockDataSource=dbi:mysql:database LockUserName=username
LockPassword=password
[18479]ENV: REDIRECT_STATUS=200
[18479]ENV: HTTP_COOKIE=EMBPERL_UID=7ef39459a818cb4f962a52b69546796e
[18479]ENV: EMBPERL_COOKIE_DOMAIN=.domain.com
[18479]ENV: REQUEST_METHOD=GET
[18479]ENV: SCRIPT_FILENAME=/disk1/www/Clients/index.epl
[18479]ENV: REDIRECT_URL=/
[18479]ENV: EMBPERL_OPTIONS=16
[18479]ENV: EMBPERL_DEBUG=16
[18479]ENV:
PATH=/:.:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/local/perl/bin:/usr/local/mysql/bin:/usr/u
cb
[18479]ENV: SERVER_PORT=80
[18479]Formdata... length = 0
On Fri, 16 Mar 2001, goEbusiness.com Mail Lists wrote:
> Sorry...made a typo :)
>
> Should be
>
> clients.domain.com
>
> and
>
> other.domain2.com
>
> So the line
>
> > > If I go to other.domain.com, I see the correct session cookie in their
>database/table.
>
> should read
>
> > > If I go to other.domain2.com, I see the correct session cookie in their
>database/table.
>
> I realize the cookies would overwrite themselves :) I made a typo.
>
> However, adding the COOKIE_DOMAIN value to set the cookies appart does set the
>cookies properly, however the sessions DB table is still written to incorrectly. In
>any case, it's a moot point cuz even if I don't have that, it's set to whatever I
>have set as the ServerName in the VirtualHost config.
>
> Bill
>
> On Fri, 16 Mar 2001, ___cliff rayman___ wrote:
>
> > your example and your text do not match! see inline comments.
> >
> > "goEbusiness.com Mail Lists" wrote:
> >
> > > If I have more than one VirtualHost setup to use Embperl sessions, randomly the
>session data for one site will be lost, and then a new cookie will be set (proper
>name, etc) but to the OTHER VIRTUAL HOSTS's Session table!
> > >
> > > Each session table is on a different database (one database per VirtualHost in
>these examples)
> > >
> > > I have enabled the DEBUG to look at the ENV, and for each request, the
>environment is set properly (ie if I go to clients.domain.com I see the SESSION_ARGS
>I set for that VirtualHost in the log, and also if I print it out from my Embperl
>processed page)
> > >
> > > I've tried putting the PerlSetEnv settings in just the <VirtualHost> tags, moved
>Directory in/out of VirtualHost...same problem.
> > >
> > > The first connection works fine, say if I got to clients.domain.com, I see the
>correct session ID in their database.
> > >
> > > If I go to other.domain.com, I see the correct session cookie in their
>database/table.
> >
> > if you use other.domain.com and clients.domain.com, then you are going to have a
>problem with a cookie
> > domain of ".domain.com". the cookie from clients.domain.com will be offered to
>other.domain.com which of
> > course has no record of it, and then delivers its own fresh cookie.
> >
> > >
> > >
> > > But then, if I randomly use other browsers or machines, or the browsers I
>already have open, the ID will change.
> > >
> > >
> > > <VirtualHost 192.168.1.11>
> > > DocumentRoot /disk1/www/Clients
> > > ServerName clients.domain.com
> > > <Directory "/disk1/www/Clients">
> > > <Files *.epl>
> > > SetHandler perl-script
> > > PerlHandler HTML::Embperl
> > > Options +ExecCGI
> > > PerlSetEnv EMBPERL_OPTIONS 16
> > > PerlSetEnv EMBPERL_COOKIE_DOMAIN ".domain.com"
> > > PerlSetEnv EMBPERL_COOKIE_PATH "/"
> > > PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL MySQL"
> > > PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:database
>UserName=username Password=password LockDataSource=dbi:mysql:database
>LockUserName=username LockPassword=password"
> > > </Files>
> > > </Directory>
> > > </VirtualHost>
> > >
> > > <VirtualHost 192.168.1.11>
> > > DocumentRoot /disk1/www/Other
> > > ServerName other.domain2.com
> > > <Directory "/disk1/www/Other">
> > > <Files *.html>
> > > SetHandler perl-script
> > > PerlHandler HTML::Embperl
> > > Options +ExecCGI
> > > PerlSetEnv EMBPERL_OPTIONS 16
> > > PerlSetEnv EMBPERL_COOKIE_PATH "/"
> > > PerlSetEnv EMBPERL_COOKIE_DOMAIN ".domain2.com"
> >
> > this of course would work, because the COOKIE_DOMAIN is different. you need to
> > examine the actual hostnames and the COOKE_DOMAIN values you have for each of
> > them.
> >
> > hth,
> >
> > --
> > ___cliff [EMAIL PROTECTED]http://www.genwax.com/
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]