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: Hi All
Date: Dec 6 1995 2:51PM

: From hauptman@icst.ml.com  Tue Dec  5 12:36:46 1995
: 
: I am integrating sybperl with a web/cgi script and it runs fine on the command 
: line, but dies with 'ERROR 500, malformed header'. I call &dbuse and &dblogin 
: prior to printing the cgi header, and I think the problem rest in the system 
: call (or maybe how my sybperl is situated in the web directory (it is included 
: in the server root path)

When a sybperl script runs OK from the command line but dies when run
as CGI, the problem is usually that the script doesn't have the SYBASE
environment variable set (CGI scripts run with a pretty minimal
environment), so it can't find the interfaces file.  You'll need to do
something like this in your script:

$env{'SYBASE'} = '/wherever/your/sybase/stuff/is';

Also, since you're not giving a servernam to &dblogin(), it's probably
looking for a server named SYBASE.  Try either giving the servername
explicitly:

$dbproc = &dblogin ($user,$password,$server);

or setting the DSQUERY environment variable in the script.

Tim Kimball
kimball@stsci.edu