Apache::DBI Segmentation fault

2001-09-10 Thread Hans Juergen von Lengerke

I am getting a segmentation fault on configtest when using Apache::DBI
(using the startup.pl example in Apache::DBI Distribution). When trying
to start the server I get no error messages but the server isn't
running afterwards:

 root@ganja:/home/www/server/conf  ../bin/apachectl start
 ../bin/apachectl start: httpd started
 root@ganja:/home/www/server/conf  ps -ef | grep httpd
 lengerke  5787 27877  0 12:11 pts/500:00:00 vi httpd.conf
 root  6434  5760  0 12:57 pts/11   00:00:00 grep httpd
 root@ganja:/home/www/server/conf  ../bin/apachectl configtest
 Syntax OK
 ../bin/apachectl: line 184:  6436 Segmentation fault  $HTTPD -t
 root@ganja:/home/www/server/conf 

When I comment out the 'use Apache::DBI' in startup.pl all works fine.
Setting $Apache::DBI::DEBUG = 2 makes no difference even in verbosity of
the error_log - the server will die without any warning or error.

The setup is:
SuSE Linux 6.3 (i386)

Apache/1.3.20 (Unix)   # (enabled proxy, rewrite, so, ssl)
PHP/4.0.6  # apxs-built DSO
mod_perl/1.26  # apxs-built DSO
mod_jk # apxs-built DSO
mod_ssl/2.8.4
OpenSSL/0.9.4

Perl 5.005_03

Apache::DBI 0.88
DBI 1.14   # works fine without Apache::DBI

Any help or pointers are appreciated.

Hans




Re: Apache::DBI Segmentation fault

2001-09-10 Thread Hans Juergen von Lengerke

Uh, sorry forgot to post Database and perl -V...

Database is Informix.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=linux, osvers=2.2.13, archname=i586-linux
uname='linux benjy 2.2.13 #4 mon aug 16 11:18:11 mest 1999 i686
unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2 -pipe', 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 -lndbm -lgdbm -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 Nov  6 1999 15:47:59
  @INC:
/usr/lib/perl5/5.00503/i586-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i586-linux
/usr/lib/perl5/site_perl/5.005
.


Hans Juergen von Lengerke:

 I am getting a segmentation fault on configtest when using Apache::DBI
 (using the startup.pl example in Apache::DBI Distribution). When trying
 to start the server I get no error messages but the server isn't
 running afterwards:
 
  root@ganja:/home/www/server/conf  ../bin/apachectl start
  ../bin/apachectl start: httpd started
  root@ganja:/home/www/server/conf  ps -ef | grep httpd
  lengerke  5787 27877  0 12:11 pts/500:00:00 vi httpd.conf
  root  6434  5760  0 12:57 pts/11   00:00:00 grep httpd
  root@ganja:/home/www/server/conf  ../bin/apachectl configtest
  Syntax OK
  ../bin/apachectl: line 184:  6436 Segmentation fault  $HTTPD -t
  root@ganja:/home/www/server/conf 
 
 When I comment out the 'use Apache::DBI' in startup.pl all works fine.
 Setting $Apache::DBI::DEBUG = 2 makes no difference even in verbosity of
 the error_log - the server will die without any warning or error.
 
 The setup is:
   SuSE Linux 6.3 (i386)
 
   Apache/1.3.20 (Unix)   # (enabled proxy, rewrite, so, ssl)
   PHP/4.0.6  # apxs-built DSO
   mod_perl/1.26  # apxs-built DSO
   mod_jk # apxs-built DSO
   mod_ssl/2.8.4
   OpenSSL/0.9.4
 
   Perl 5.005_03
 
   Apache::DBI 0.88
   DBI 1.14   # works fine without Apache::DBI
 
 Any help or pointers are appreciated.
 
 Hans
 




Re: Apache::DBI Segmentation fault

2001-09-10 Thread Perrin Harkins

 I am getting a segmentation fault on configtest when using Apache::DBI
 (using the startup.pl example in Apache::DBI Distribution). When trying
 to start the server I get no error messages but the server isn't
 running afterwards

Do you know that your DBI works without Apache::DBI?  It would be helpful if
you could post the relevant parts of your httpd.conf and startup.pl too.
- Perrin




Re: Apache::DBI Segmentation fault

2001-09-10 Thread Hans Juergen von Lengerke

Hi,

I actually got this to work now. The segfault happens when I load
Apache::Registry before Apache::DBI. However, I have used the
eg/startup.pl from the Apache::DBI distribution and that has
Apache::Registry loaded before Apache::DBI... Maybe this is a bug?

My httpd.conf Perl* relevant parts:
  LoadModule perl_module libexec/libperl.so
  [...]
  PerlRequire /home/www/server/conf/startup.pl
  PerlFreshRestart on
  [...]
  PerlModule Apache::Registry
  DirectoryMatch /home/www/hosts/[^/]*/cgi-perl
  Options FollowSymLinks ExecCGI
  SetHandler perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On
  AllowOverride None
  Order allow,deny
  Allow from all
  /DirectoryMatch
  [...]
  Location /perl-status
  SetHandler perl-script
  PerlSetVar StatusOptionsAll On
  PerlHandler Apache::Status
  /Location

and the (fixed) startup.pl:
  #!/usr/local/bin/perl -w
  $ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die GATEWAY_INTERFACE not Perl!;
  use Apache::DBI;
  use Apache::Registry;
  use strict;
  $Apache::DBI::DEBUG = 2;

Now if Apache::Registry is loaded before Apache::DBI in startup.pl I get
the segfault. Also, If I don't use startup.pl and put a 'PerlModule
Apache::DBI' _after_ the 'PerlModule Apache::Registry' in my httpd.conf
I also get the segfault. I am aware that any modules that use DBI must
be loaded _after_ Apache::DBI but I didn't think Apache::Registry uses
DBI, or does it?

Hans


Perrin Harkins:

  I am getting a segmentation fault on configtest when using Apache::DBI
  (using the startup.pl example in Apache::DBI Distribution). When trying
  to start the server I get no error messages but the server isn't
  running afterwards
 
 Do you know that your DBI works without Apache::DBI?  It would be helpful if
 you could post the relevant parts of your httpd.conf and startup.pl too.
 - Perrin