I realize not a lot of you do mod_perl stuff, but I¹m trying to create a
database preloader using a typical startup.pl file. I¹m using the mod_perl
example out of the mod_perl O¹Reilly book in Chapter 4. I have it compiling
and seemingly functioning properly (I can¹t test it just yet)...but as soon
I run my startup.pl, all my web hosting errors out with bus errors.

Here¹s what I¹ve done:

My httpd.conf file has this line at the bottom:

PerlRequire /System/Library/Perl/5.8.6/Test/startup.pl

My startup.pl script is very basic:

package Test::Startup;

use strict;

use Apache::Registry ();
use LWP::UserAgent ();
use Apache::DBI ();
use DBI;

use Carp ();
$SIG{__WARN__} = \&Carp::cluck;

use CGI ();
CGI->compile(':all');

use Test::Config();

#--------------------------------------------------------------------------
sub init()
{
    my $paths             = Test::Config::getPaths();
    my $connectString     = Test::Config::getConnectString();
    
    my %dbConnections     =
login($connectString,$paths->{root}.$paths->{goDB});
}
#--------------------------------------------------------------------------
sub login {
    my ($dsh,$user,$pass) = @_;

    my $dbh = "";

    $dbh = Apache::DBI->connect_on_init ($dsh,$user,$pass,
            {
            PrintError => 1, # warn() on errors
            RaiseError => 0, # don't die on error
            AutoCommit => 1, # commit executes immediately
            }
    );    
    return $dbh;
}

init();
1;

What might I be violating? I¹m not using any Local %ENV references, and my
system isn¹t configured for any <VirtualHost> settings.

I¹m running the latest version of Tiger.

Mark

Reply via email to