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: Timothy Kimball <kimball at stsci dot edu>
Subject: Re: question
Date: Dec 7 1995 7:51PM

: My sybperl code works fine on the command line but, it doesn't
: when I call it as a cgi-script from the netscape.
: The error message I've got is
: "500 Server Error, httpd: malformed header from script".
: 
: Since my code is rather short, I have commented each line by line
: and find that if I comment "use Sybase::DBlib;", then
: it doesn't complain (of course it doesn't produce any result).
: This means that "use Sybase::DBlib;" was not properly processed.
: Can anyone teld me what's wrong with my code?

You need to set the SYBASE environment variable in the script:

  $ENV{'SYBASE'} = '/usr/local/syb_491';

(You can set this before or after the "use Sybase::DBlib;" line, but it
must appear before the dblogin.)  Otherwise, sybperl will not know
where to find the interfaces file, and won't be able to open a
connection with the server.

Tim Kimball
kimball@stsci.edu