cleaning old Apache::Session's

2000-06-01 Thread Adam Cassar

I was wondering how people are clearing out old Apache::Session's

No timestamp is used on the fields used by Apache::Session, so how do
we clear the old sessions? 

I am not talking about the delete() method to remove a session, as that
presumes that a user will always leave your site via pre-defined access
points.

-- 

Adam Cassar
Senior Web Developer
___
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia




Apache, mod_perl and DBI

2000-02-14 Thread Adam Cassar

hello people

me again with the Apache::DBI and apache problems

the scenario - a very basic install of redhat 6.1

downloaded mod_perl 1.21
 apache-1.3.11

from cpan

Apache::DBI v0.87
DBI v1.13
DBD::mysql  v2.0218

using the default httpd.conf with mod_perl added as a module

I add the line at the end of the config
PerlModule Apache::DBI

the server refuses to start, no logs, no nothing. running strace on apache
shows that it crashes when it spawns the client and loads the DBI modules

any ideas?

-- 

Adam Cassar
Senior Web Developer
___
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia



Re: Apache::DBI woes

2000-02-11 Thread Adam Cassar


> Is this an Apache rpm and mod_perl rpm of redhat linux - if it is then it
> may be a redhat rpm Apache::DBI problem that may not have been solved (to my
> knowledge, could be wrong) - if it is an rpm install then try compling
> everything from source - and see if it works.

Admittedly this is on a redhat machine, however all the Perl, Modperl and Apache
stuff is compiled from source or retrieved from CPAN. A Debian machine with a
similar configuration (however with apache 1.3.9 and modperl 1.21_01-dev). It
would be good if a solution can be found however it is no big deal, i just
have to convince my sysadmin to use something besides redhat, which he should
be doing anyway.

However another problem I am experiencing an ANY machine is with
Apache::Session::DBI (however other methods work fine, ie ::FILE)

when trying to create a new session using the postgres dbd driver I get the
following error:

DBD::Pg::st execute failed: ERROR:  parser: parse error at or near ""

If i try to run the perl debugger on it I find that the error occurs in the
insert method in DBIStore.pm

Attempting to print the query string works fine and I can do a manual insert
of the same data.

However if I enable DBI logging i get a query string similar to the following:

-> execute for DBD::Pg::st (DBI::st=HASH(0x81f5298)~0x81f51d8)
dbd_st_execute
dbd_st_execute: statement = >
INSERT INTO sessions (id, length, a_session) VALUES ('d729949384de79cf',41,'^C^C<
ERROR EVENT 7 'ERROR:  parser: parse error at or near ""
' on DBI::st=HASH(0x81f51d8)
ERROR:  parser: parse error at or near ""
error 7 recorded: ERROR:  parser: parse error at or near ""
!! ERROR: 7 'ERROR:  parser: parse error at or near ""
'
<- execute= undef at DBIStore.pm line 143.

Is Postgres getting confused by the session information in the last field?

I have no problems with DBI connections using perl and postgres

Perl Info Follows

version of Apache::Session: 1.03
version of DBI: 1.13
database Postgres 6.5.3, dbd driver version 0.93
mod_perl: 1.21
apache: 1.3.9

perl -v: 5.005_03

perl -V:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.3.39, archname=i386-linux
uname='linux samwise.tausq.org 2.3.39 #1 smp wed jan 12 05:59:50 mst 2000 i686 
unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2 ', gccversion=2.95.2 19991109 (Debian GNU/Linux)
cppflags='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under linux
  Compiled at Jan 22 2000 10:24:15
  @INC:
/usr/lib/perl5/5.005/i386-linux
/usr/lib/perl5/5.005
/usr/local/lib/site_perl/i386-linux
/usr/local/lib/site_perl
/usr/lib/perl5
.


-- 

Adam Cassar
Senior Web Developer
___
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia



Apache::DBI woes

2000-02-09 Thread Adam Cassar

Hello All,

I have been having numerous problems with Apache::DBI, I have tried using
PerlRequire startup.pl

with startup.pl containing
use Apache::DBI;

and also tried 
PerlModule Apache::DBI;

in httpd.conf

with only this module loaded but to no success. I can load Apache::Registry fine.


basically my server refuses to start if I have it included in httpd.conf
with no debugging output from apache

version of ApacheDBI: 0.87
version of DBI: 1.13
database Postgres 6.5.2, dbd driver version 0.93
mod_perl: 1.21
apache: 1.3.11

I have no problems with DBI connections using perl

an strace of apache reveals the following (the last few lines)

any ideas?

13803 stat("/usr/lib/perl5/5.00503/i386-linux/auto/DBI", 0xbfffd40c) = -1 ENOENT (No 
such file or directory)
13803 stat("/usr/lib/perl5/5.00503/auto/DBI", 0xbfffd40c) = -1 ENOENT (No such file or 
directory)
13803 stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI", 
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
13803 stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI/DBI.so", 
{st_mode=S_IFREG|0555, st_size=58772, ...}) = 0
13803 stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI/DBI.bs", 
{st_mode=S_IFREG|0444, st_size=0, ...}) = 0
13803 --- SIGSEGV (Segmentation fault) ---

perl -v 

5.003_03

perl -V follows

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.2.5-22smp, archname=i386-linux
uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 
i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 
release)
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under linux
  Compiled at Aug 30 1999 23:09:51
  @INC:
/usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005
.