in reply to Re: mod_perl 2 DBI problem
in thread mod_perl 2 DBI problem

The code is kind of large to paste it all so i'll paste the relevant to the connection:


this module is loaded from a module that is loaded on a mod_perl handler

package Suae; # bunch of functions..... #Function that establishes the connection #my $CONEXION = "dbi:Sybase:server=$host"; my $CONEXION = "dbi:Pg:dbname=mydb;host=myhost.com"; # print "<br><b>Suae::DEBUGE conectando: dbi:Pg:dbname=avc;host= +myhost.com</b><br>"; # print STDERR "Suae::DEBUGE conectando: dbi:Pg:dbname=avc;host= +myhost.com\n"; my $suaedbh = DBI->connect($CONEXION,"user","pass"); if(!defined($suaedbh)){ $r->log_error("Error connecting to the database ($DBI::errstr)\ +n"); return(undef); }


This works when i call the module from within a test program, but it does not work when the module is loaded from a mod_perl handler


ignorance, the plague is everywhere
--guttermouth