On Mon, 2005-07-11 at 17:14 -0400, John Saylor wrote:
> ( 05.07.11 16:43 -0400 ) Perrin Harkins:
> > Okay, where are you getting stuck?
> 
> apache [mod_perl] seg faults on startup.

Now we're getting somewhere.  When exactly does it segfault?  What do
you have to take out to make it stop segfaulting?  One possible cause
would be storing your database handles in a global or in a closure
variable (as opposed to letting Apache::DBI handle them).

> > > it works on perl 5.8.x but not on earlier versions [upgrading is not an
> > > option at this time].
> 
> > What does?
> 
> calling a subroutine that initializes a global data structure in a
> different namespace [ie, %PACKAGE::dbHash].

So this all worked fine when you developed it on 5.8, but when you tried
it on 5.6 it segfaulted?

> the subroutine goes to the db, grabs the data, and pushes it onto a
> hash. i think the problem was traced to Apache::DBI not being able to
> handle the request so early.

Apache::DBI handles requests during startup just fine.  It will not
persist handles opened during startup.

> i've just found Tie::DBI which may help.

I don't see why it would.  Connecting to the database during startup
should be fine, so if it isn't working for you, there is something wrong
with your build or your code.

- Perrin

Reply via email to