Vikash_Chauhan wrote: > > I get the following in my log file: > > [notice] child pid xxxx exit signal Segmentation fault (11) > > Occurs when I try to execute a SQL query within a perl subroutine. > > Following code results in Seg fault above when refreshed a few times. >
Does this problem happen in mod_perl without Apache::ASP, or in plain old CGI without mod_perl? How about from command line? Sometimes things break in mod_perl that work fine outside it, but this likely has nothing to do with Apache::ASP. If this happens only in mod_perl vs. command line, I might email the mod_perl email list about it. If this happens from the command line too, I might email the DBI users list about it. Also try not to defined sub routines in your ASP scripts. In this case the first $dbh created might get stored by the subroutine definition so you are really using and old disconnected $dbh the second time around. If this is the problem, you would likely experience the same problem if running the code as a CGI script run under Apache::Registry. You can actually have subroutines defined in ASP scripts, but you have to code them carefully to make sure that all variables used in the script are localized with my() and passed in via @_. You can move a subroutine definition to the global.asa file, and have that subroutine shared safely between scripts. I have never worked with PostgreSQL, but I have had problems with MySQL & Oracle. My next suggestion would be to make sure you have rebuilt your DBD::Pg driven against your latest database source code, and make sure that this is installed in the same perl that mod_perl is built on in the system ( sometimes there are multiple perl versions on a box ). --Josh _________________________________________________________________ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com 1-714-625-4051 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
