RE: Problem with Apache::DBI under mod_perl!!

2000-11-27 Thread Jason Liu

I had some similar problem before.  It was caused by the "PerlFreshRestart
on".   Comment this line out and see what happens.

Jason



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Edmar Edilton da Silva
> Sent: Thursday, November 23, 2000 5:40 AM
> To: [EMAIL PROTECTED]
> Subject: Problem with Apache::DBI under mod_perl!!
>
>
> Hi all,
>
> 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
> Apache::DBI 0.87
>
> 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.
>
> 
>   PerlFreshRestart On
>   Alias /perl-bin/ /home/httpd/perl-bin/
>   
> SetHandler perl-script
> PerlHandler Apache::Registry
> PerlSendHeader On
> Options +ExecCGI
>   
> 
>
> 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.
> 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
> 
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with Apache::DBI under mod_perl!!

2000-11-24 Thread Edmund Mergl

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.
> 
> 
>   PerlFreshRestart On
>   Alias /perl-bin/ /home/httpd/perl-bin/
>   
> SetHandler perl-script
> PerlHandler Apache::Registry
> PerlSendHeader On
> Options +ExecCGI
>   
> 
> 
> 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]




Re: Problem with Apache::DBI under mod_perl!!

2000-11-23 Thread Edmar Edilton da Silva

Hi,
I added the code folow in the config file, but the Apache ::DBI
module continue don't working. If I don't load the Apache::DBI module,
the apache 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, but I don't know where. Can anybody help me?
Thanks,

Ian Kallen wrote:

> > #!/usr/bin/perl
> >
> > use strict;
> >
> > # Extend @INC if needed
> > use lib qw(/dir/foo /dir/bar);
>
> # ok, setup the Oracle and (optionally) the debug DBI environment
> BEGIN {
> $ENV{'ORACLE_HOME'}='/highway/to/orac/hell';
> $ENV{DBI_TRACE}="3=/var/tmp/dbitrace.log";
> }
>
> >
> > # Make sure we are in a sane environment.
> > $ENV{MOD_PERL} or die "not running under mod_perl!";
>
> ciao
>
> --
> Salon Internet http://www.salon.com/
>   Manager, Software and Systems "Livin' La Vida Unix!"
> Ian Kallen <[EMAIL PROTECTED]> / AIM: iankallen / Fax: (415) 354-3326
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--

Edmar Edilton da Silva
Bacharel em Ciência da Computacão - UFV
  Mestrando em Ciência da Computacão - UNICAMP






Re: Problem with Apache::DBI under mod_perl!!

2000-11-23 Thread Ian Kallen

> #!/usr/bin/perl
> 
> use strict;
> 
> # Extend @INC if needed
> use lib qw(/dir/foo /dir/bar);

# ok, setup the Oracle and (optionally) the debug DBI environment
BEGIN {
$ENV{'ORACLE_HOME'}='/highway/to/orac/hell';
$ENV{DBI_TRACE}="3=/var/tmp/dbitrace.log";
}

> 
> # Make sure we are in a sane environment.
> $ENV{MOD_PERL} or die "not running under mod_perl!";

ciao

--
Salon Internet  http://www.salon.com/
  Manager, Software and Systems "Livin' La Vida Unix!"
Ian Kallen <[EMAIL PROTECTED]> / AIM: iankallen / Fax: (415) 354-3326 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with Apache::DBI under mod_perl!!

2000-11-23 Thread Edmar Edilton da Silva

Sorry, but I forgot, I also have installed a DBD module for the
Oracle ( the "DBD::Oracle" ). Do you have any idea to resolve this
problem?
Thanks,

Sapphire Software wrote:

> Hello
>
> Don't you need a DBD module?
>
> Or did I miss something?
>
> Ruben
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--

Edmar Edilton da Silva
Bacharel em Ciência da Computacão - UFV
  Mestrando em Ciência da Computacão - UNICAMP






Re: Problem with Apache::DBI under mod_perl!!

2000-11-23 Thread Sapphire Software

Hello


Don't you need a DBD module?

Or did I miss something?

Ruben


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]