testing_apache_dbi

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Problem with Apache::DBI under mod_perl!!
From: Edmund Mergl <e.mergl@bawue.de>
Date: Fri, 24 Nov 2000 22:13:43 +0100

Edmar Edilton da Silva wrote:
> 
> Hi all,
> 
>     I am sending again the previous message because I still didn't know how
> 
> to resolve the below problem. Can anyone any idea how help me?
> 
>         I have installed on the my machine the following modules:
> apache 1.3.12-2
> perl-5.00503-10
> mod_perl 1.21-10
> DBI 1.14
> 
> DBD::Oracle
> Apache::DBI 0.87
> 
> Oracle Client Software
> 
> For enable the mod_perl module, I added the below code in the
> configuration file of apache ("httpd.conf"):
> 
> # If the perl module is installed, this will be enabled.
> 
> <IfModule mod_perl.c>
>   PerlFreshRestart On
>   Alias /perl-bin/ /home/httpd/perl-bin/
>   <Location /perl-bin>
>     SetHandler perl-script
>     PerlHandler Apache::Registry
>     PerlSendHeader On
>     Options +ExecCGI
>   </Location>
> </IfModule>
> 
> For load the Apache::DBI module, I also added this line in the
> "httpd.conf" file:
> PerlRequire /etc/httpd/conf/startup.pl
> 
> Inside of "startup.pl" file, I added the following code:
> #!/usr/bin/perl
> 
> use strict;
> 
> # Extend @INC if needed
> use lib qw(/dir/foo /dir/bar);
> 
> # Make sure we are in a sane environment.
> $ENV{MOD_PERL} or die "not running under mod_perl!";
> 
> # For things in the "/perl-bin" URL
> use Apache::Registry;
> 
> # Load Perl modules of your choice here
> # This code is interpreted *once* when the server starts
> use Apache::DBI ();
> $Apache::DBI::DEBUG = 2;
> $Apache::AuthDBI::DEBUG = 2;
> use DBI ();
> 
> # Tell me more about warnings
> use Carp ();
> $SIG{__WARN__} = \&Carp::cluck;
> 
> # Load CGI.pm and call its compile() method to precompile
> # (but not to import) its autoloaded methods.
> use CGI ();
> CGI->compile(':all');
> 
> #Initialize the database connections for each child
> Apache::DBI->connect_on_init
> ("dbi:Oracle:ora8", "travel", "travel",
>    {
>        PrintError => 1, # Warn() on errors
>        RaiseError => 0, # Don't die on error
>        AutoCommit => 1, # Commit executes immediately
>    }
> );
> 
> But, when I try loading a HTML page of WWW server, the server refuse my
> request. I think that the problem is in the WWW server that don't load
> their child process because to the Apache::DBI to be with some problem.
> During the installation of all the modules didn't have any problem. The
> apache start correctly, but when I try stoping them, I get a error
> message that the process failed. If I don't load the DBI and Apache::DBI module
> 
> in the apache, it works correctly. Using only the DBI and
> DBD::Oracle modules, I can access the Oracle database no problems. Really the
> 
> problem must be in the Apache::DBI ( when it is loaded ), but I don't know exactly
> 
> where. Can anybody help me? Locking the configuration files, can anyone tell me
> 
> what is happening? Any help will very appreciated.
> 
> ________________________________________________
>             Edmar Edilton da Silva
>     Bacharel em Ci

the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu