Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Gregory Riggs <greg at nmia dot com>
Subject: Re: Segfault problem with DBD::Sybase and Apache::ASP
Date: Mar 23 1999 4:02PM


On Tue, 23 Mar 1999, Michael Peppler wrote:

> It's surprising that Sybase::CTlib works where DBD::Sybase doesn't, as
> they use the same underlying library.

> Also, if you code the same example with Sybase::CTlib, and include
>       $dbh = undef;
> at the end, do you get a core dump too?

  I just tried this, and yes it does cause a core dump.  It turns out that
Sybase::CTlib is always core dumping also.   I just didn't notice before, 
because the page renders okay with my Sybase::CTlib test, whereas with 
my DBD::Sybase test the page doesn't render, but instead I'd get an 
"Unexpected network read error; connection aborted."  Tailing the apache 
error_log file, I see now that is is always crashing for both libraries.

  With my Sybase::CTlib test, the page output gets sent to the browser 
before the database connection gets closed (and crashes), whereas with 
my DBD::Sybase it is attempting to close the connection (and crashes) 
before getting a chance to send the page.  Adding the "$dbh = undef;"
to my Sybase::CTlib test, causes it to now crash before it gets
a chance to send the page to the browser.

  I guess for now, I will try and keep the $dbh variable in global memory, 
and not close the connection.  

> libtcl.a library). Does Apache::ASP do any network access directly, or
> is it only a module that parses the html and executes bits of perl
> code in the middle?

  I don't believe that Apache::ASP accesses the network directly.  It
does use the following perl modules though:

  Apache, Carp, Data::Dumper, Fcntl, File::Basename, File::stat, FileHandle, 
  HTTP::Date, MD5, MLDBM, SDBM_File, CGI Devel::Symdump 

On Tue, 23 Mar 1999, Jonathan Fine (IT- Borders Online) wrote:

> Try putting:
> {
>       $ENV{'SYBASE'} = "/opt/sybase";
> }
> in your script; that's a common oversight.  ("/opt/sybase" above is that
> path to your Sybase intallation.)

   I just tried this but I still get the segfault problem.  I also added 
"export SYBASE=/opt/sybase" to the shell script I use to start the apache 
web server, but still no luck.

Thank You for the help!
Greg Riggs