I finally got a CGI script to play nicely with forking and doing some DBI work on both the parent & child processes. The database handle was created before the fork and before the 'enlightenment', I was using the same db handle variable in both processes, which led to some very strange results.

To fix this, I created a new db handle within the child process, and all was peachy again. :)

Jason

Replies are listed 'Best First'.
Re: Lesson learned: Forking & DBI
by perrin (Chancellor) on Nov 07, 2001 at 11:45 UTC
    This is the reason that Apache::DBI refuses to cache database connections opened before Apache/mod_perl forks.