On Fri, 2004-05-07 at 17:03, Hans Poo R. wrote:
> Fosis::handler is the main Dispatcher of the dynamic content. It can use the
> database handler via a Global variable $dbh

It's not a good practice to put a database handle in a global. 
Apache::DBI does it, but it also pings the handle before using it and
uses a cleanup handler to do a rollback.  Putting it in your own global
could result in a dead handle getting used if you aren't careful.

I'd suggest that you create an accessor function instead, like
Fosis::get_dbh(), and always call that to get a handle.  (It's okay to
put it in a lexical variable temporarilly.)  That function would call
DBI->connect() which will go through Apache::DBI.

This might be the cause of the problems you're having, or it might not,
but it's definitely a red flag for me.

> I turned on $Apache::DBI on level 2 of debugging and i've included the output
> of the error_log. It doesn't look so bad...

It doesn't look bad to me either, but I still think you might want to
run through the debugger and look at where this problem occurs.  Either
that, or add a bunch of logging to trace the execution path.  I don't
know any other way to find out what's going on when that message is
generated.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to