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
>