PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Strand, Paul" <pstrand at desmoine dot gannett dot com>
Subject: Re: Command line vs. Apache
Date: Mar 4 2010 6:41PM

I checked through the Apache errors log and found this:

[Thu Mar  4 12:19:04 2010] [error] [client 10.4.12.242] Premature end of script headers: /Volumes/Intranet/Site/scripts/dtdatabases.pl
Can't load '/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/Sybase/Sybase.bundle' for module DBD::Sybase: dlopen(/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/Sybase/Sybase.bundle, 1): Library not loaded: libct.dylib
  Referenced from: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/Sybase/Sybase.bundle
  Reason: image not found at /System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230.
at /Volumes/Intranet/Site/scripts/dtdatabases.pl line 17
Compilation failed in require at /Volumes/Intranet/Site/scripts/dtdatabases.pl line 17.
BEGIN failed--compilation aborted at /Volumes/Intranet/Site/scripts/dtdatabases.pl line 17.

...and at line 230 in DynaLoader.pm I found this comment:

    # Many dynamic extension loading problems will appear to come from
    # this section of code: XYZ failed at line 123 of DynaLoader.pm.
    # Often these errors are actually occurring in the initialisation
    # C code of the extension XS file. Perl reports the error as being
    # in this perl code simply because this was the last perl code
    # it executed.

How do I debug this?  What things should I check?

Any help would be appreciated.

Thanx,
Paul

On 2/25/10 4:26 PM, "Paul Strand"  wrote:

I have a perl CGI script that works when I run it at the command line (Mac OS X 10.4.8 Server), but in the browse stops rendering the page at:

$dbh = DBI->connect('DBI:Sybase:server=SRVR;database=db','USERNAME','PASSWORD');

This is working on another 10.4.8 box set up by people who don't work here anymore.  I finally got it working on the command line by updating:

    BEGIN {
        $ENV{SYBASE} = '/Sybase';
    }

in the script.  The original author has this too, but with the "wrong path" ("/usr/local").  What appears to be common to these two paths is the "interfaces" file, so I'm guessing we just put things in different places.

I'm sorry if this is a more general perl question or a more general apache question, but how does one even start debugging something that works at the command line, but not in Apache?  I verified both spit out 5.8.6 as the version number.

Thanx,
Paul

--
Paul Strand
Programmer/Analyst
The Des Moines Register
V:515-699-7015
C:515-360-7553
pstrand@desmoine.gannett.com