Dear all,
I use embperl's sessions management with mySQL under Suse Linux. I am
experiencing non deterministic behaviour from embperl's session management
as %udat does not always store or retrieve data appropriately. I use IE5 and
I have it configured to check for newer versions of stored pages on every
visit to the page. I retrieve some page successfully, then I try to fetch it
again and it fails. The rate of failure varies. I really do not know whether
it is indeed embperl that is causing the failure or, if it might be the
Apache web server or mySQL that is causing it.
I operate the web server (Apache) on a LAN (ethernet).
It is worth mentioning that the graphics on my pages do not them either
always load, although it rarely happens. That could indicate that embperl's
session management is working and that the browser or web server fails to
send data successfully between themselves.
Furthermore, I always access %udat 'directly' on every page to enable the
session management to detect change.
I have the feeling that there is some time out occurring somewhere in the
process. Whether it is emberl, mySQL, Apache, or even the browser, that is
causing the problem I do not know.
Does anyone have a clue?
Please see my configuration files below.
regards
ragnar
------------- startup.pl --------------
#!/usr/bin/perl
BEGIN {
use Apache ();
use lib Apache->server_root_relative('lib/perl');
unshift (@INC, "/caseTracking/packages");
}
use Apache::Registry();
use Apache::Status;
use Apache::DBI;
use Apache::AuthDBI;
use DBI;
use Apache::Constants();
use CGI qw(-compile :all);
use CGI::Carp();
use LWP();
use Apache::Session();
use Apache::TicketAccess();
use Apache::SubTicketAccess();
use Storable;
$ENV{TRACE_LEVEL}=3;
$ENV{TRACE_FILE_NAME}="/caseTracking/logs/dbTraceLog";
$ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker";
$ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:mysql:session UserName=clm";
$Apache::DBI::DEBUG=2;
$Apache::Session::SysVSemaphoreLocker::nsems = 32;
# -- Access directives for 'protected' area --
Apache::SubTicketAccess->configure('protected', {
TicketDB => 'dbi:Pg(AutoCommit=>0):dbname=transactiondb',
TicketDBUser => 'clm',
TicketUserTable => 'users:username:passwd',
TicketTable => 'tickets:ticket_hash:expires',
TicketSecretTable => 'ticketsecrets:sec_data:sec_version',
TicketDomain => '.conquestnetwork.com',
TicketPath => '/protected',
TicketSecure => 0,
TicketLoginForm => '/loginform',
TicketLoginScript => '/login',
TicketExpires => 30,
TicketLogoutURI => '/logout.html',
TicketDefaultPage => '/home.epl',
});
1;
------------- perl.conf ---------------
PerlRequire conf/startup.pl
PerlFreshRestart On
# SetEnv DBI_DSN "Pg"
<location /hello/world>
SetHandler perl-script
PerlHandler Apache::Hello
</location>
alias /perl/ /caseTracking/www/perl/
<location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</location>
SetEnv EMBPERL_DEBUG 270352
SetEnv EMBPERL_VIRTLOG /embperl/log
SetEnv EMBPERL_COOKIE_NAME CONQUEST_UID
#SetEnv EMBPERL_DEBUG 3170492
# SetEnv EMBPERL_COOKIE_EXPIRES 01/01/2100
# SetEnv EMBPERL_OPTIONS 262144
<location /embperl/log>
SetHandler perl-script
PerlHandler HTML::Embperl
Options execcgi
</location>
<files *.epl>
SetHandler perl-script
PerlHandler HTML::Embperl
Options +ExecCGI
</files>
AddType text/html .epl
# Access directives
<location /protected>
PerlAccessHandler Apache::SubTicketAccess->authenticate
PerlSetVar TicketRealm protected
</location>
<location /loginform>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->login_form
PerlSetVar TicketRealm protected
</location>
<location /login>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->login
PerlSetVar TicketRealm protected
</location>
<location /protected/logout>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->logout
PerlSetVar TicketRealm protected
</location>
# Enable Status support
<Location /server-status>
setHandler server-status
order deny,allow
deny from all
allow from localhost, 192.168.0.44
allow from 192.168.0.150
</Location>
ExtendedStatus on
I use embperl's sessions management with mySQL under Suse Linux. I am
experiencing non deterministic behaviour from embperl's session management
as %udat does not always store or retrieve data appropriately. I use IE5 and
I have it configured to check for newer versions of stored pages on every
visit to the page. I retrieve some page successfully, then I try to fetch it
again and it fails. The rate of failure varies. I really do not know whether
it is indeed embperl that is causing the failure or, if it might be the
Apache web server or mySQL that is causing it.
I operate the web server (Apache) on a LAN (ethernet).
It is worth mentioning that the graphics on my pages do not them either
always load, although it rarely happens. That could indicate that embperl's
session management is working and that the browser or web server fails to
send data successfully between themselves.
Furthermore, I always access %udat 'directly' on every page to enable the
session management to detect change.
I have the feeling that there is some time out occurring somewhere in the
process. Whether it is emberl, mySQL, Apache, or even the browser, that is
causing the problem I do not know.
Does anyone have a clue?
Please see my configuration files below.
regards
ragnar
------------- startup.pl --------------
#!/usr/bin/perl
BEGIN {
use Apache ();
use lib Apache->server_root_relative('lib/perl');
unshift (@INC, "/caseTracking/packages");
}
use Apache::Registry();
use Apache::Status;
use Apache::DBI;
use Apache::AuthDBI;
use DBI;
use Apache::Constants();
use CGI qw(-compile :all);
use CGI::Carp();
use LWP();
use Apache::Session();
use Apache::TicketAccess();
use Apache::SubTicketAccess();
use Storable;
$ENV{TRACE_LEVEL}=3;
$ENV{TRACE_FILE_NAME}="/caseTracking/logs/dbTraceLog";
$ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker";
$ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:mysql:session UserName=clm";
$Apache::DBI::DEBUG=2;
$Apache::Session::SysVSemaphoreLocker::nsems = 32;
# -- Access directives for 'protected' area --
Apache::SubTicketAccess->configure('protected', {
TicketDB => 'dbi:Pg(AutoCommit=>0):dbname=transactiondb',
TicketDBUser => 'clm',
TicketUserTable => 'users:username:passwd',
TicketTable => 'tickets:ticket_hash:expires',
TicketSecretTable => 'ticketsecrets:sec_data:sec_version',
TicketDomain => '.conquestnetwork.com',
TicketPath => '/protected',
TicketSecure => 0,
TicketLoginForm => '/loginform',
TicketLoginScript => '/login',
TicketExpires => 30,
TicketLogoutURI => '/logout.html',
TicketDefaultPage => '/home.epl',
});
1;
------------- perl.conf ---------------
PerlRequire conf/startup.pl
PerlFreshRestart On
# SetEnv DBI_DSN "Pg"
<location /hello/world>
SetHandler perl-script
PerlHandler Apache::Hello
</location>
alias /perl/ /caseTracking/www/perl/
<location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</location>
SetEnv EMBPERL_DEBUG 270352
SetEnv EMBPERL_VIRTLOG /embperl/log
SetEnv EMBPERL_COOKIE_NAME CONQUEST_UID
#SetEnv EMBPERL_DEBUG 3170492
# SetEnv EMBPERL_COOKIE_EXPIRES 01/01/2100
# SetEnv EMBPERL_OPTIONS 262144
<location /embperl/log>
SetHandler perl-script
PerlHandler HTML::Embperl
Options execcgi
</location>
<files *.epl>
SetHandler perl-script
PerlHandler HTML::Embperl
Options +ExecCGI
</files>
AddType text/html .epl
# Access directives
<location /protected>
PerlAccessHandler Apache::SubTicketAccess->authenticate
PerlSetVar TicketRealm protected
</location>
<location /loginform>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->login_form
PerlSetVar TicketRealm protected
</location>
<location /login>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->login
PerlSetVar TicketRealm protected
</location>
<location /protected/logout>
SetHandler perl-script
PerlHandler Apache::SubTicketAccess->logout
PerlSetVar TicketRealm protected
</location>
# Enable Status support
<Location /server-status>
setHandler server-status
order deny,allow
deny from all
allow from localhost, 192.168.0.44
allow from 192.168.0.150
</Location>
ExtendedStatus on