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ência da Computacão - UFV
> Mestrando em Ciência da Computacão - UNICAMP
> ________________________________________________
if you have problems with Apache::DBI start with
a very simple configuration.
First of all make sure your script runs without Apache::DBI.
Then add
use Apache::DBI ();
$Apache::DBI::DEBUG = 1;
to your startup.pl and watch the eror_log for the appropriate
messages.
If this works go ahead and use connect_on_init() and any other
option.
Edmund
--
http://www.edmund-mergl.de
fon: +49 700 edemergl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]