1#!/usr/local/bin/perl -w 2 3# to load this file when the server starts, add this to httpd.conf: 4# PerlRequire /path/to/startup.pl 5 6# make sure we are in a sane environment. 7$ENV{MOD_PERL} or die "GATEWAY_INTERFACE not Perl!"; 8 9use Apache::Registry; 10use Apache::DBI; 11#use Apache::AuthDBI; 12use strict; 13 14 15# optional configuration for Apache::DBI.pm: 16 17# choose debug output: 0 = off, 1 = quiet, 2 = chatty 18#$Apache::DBI::DEBUG = 2; 19 20# configure all connections which should be established during server startup. 21# keep in mind, that if the connect does not succeeed, your server won't start 22# until the connect times out (database dependent) ! 23# you may use a DSN with attribute settings specified within 24#Apache::DBI->connect_on_init("dbi:driver(AutoCommit=>1):database", "userid", "passwd"); 25 26# configure the ping behavior of the persistent database connections 27# you may NOT not use a DSN with attribute settings specified within 28# $timeout = 0 -> always ping the database connection (default) 29# $timeout < 0 -> never ping the database connection 30# $timeout > 0 -> ping the database connection only if the last access 31# was more than timeout seconds before 32#Apache::DBI->setPingTimeOut("dbi:driver:database", $timeout); 33 34 35# optional configuration for Apache::AuthDBI.pm: 36 37# choose debug output: 0 = off, 1 = quiet, 2 = chatty 38#$Apache::AuthDBI::DEBUG = 2; 39 40# set lifetime in seconds for the entries in the cache 41#Apache::AuthDBI->setCacheTime(0); 42 43# set minimum time in seconds between two runs of the handler which cleans the cache 44#Apache::AuthDBI->setCleanupTime(-1); 45 46# use shared memory of given size for the cache 47#Apache::AuthDBI->initIPC(50000); 48 49 501; 51