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: kim at ipac dot caltech dot edu
Subject: question
Date: Dec 7 1995 12:41AM

Can anyone shed light for the following problem?
This is a similar problem that was posted a few days ago.
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?
Thanks,
DongChan

My test sybperl code:

--------------------------------------------------------------
require 'cgi-lib.pl';
&ReadParse(*input);
print &PrintHeader;
#@objname=keys(%input);
#print "objname=", @objname;
@objname="NGC2403";

use Sybase::DBlib;
$env{'SYBASE'} = '/home/sybase/10.0.1';
$dbh = Sybase::DBlib->dblogin(w3ned, passwd, gemini);

$dbh->dbcmd("select * from images where galaxy like '@objname'");
$dbh->dbsqlexec; $dbh->dbresults;
while(@dat = $dbh->dbnextrow) {
   print "$dat[0] $dat[1] $dat[2] $dat[3] $dat[4] $dat[5]
    $dat[6] $dat[7] $dat[8] $dat[9] $dat[10] $dat[11] $dat[12]
    $dat[13] $dat[14] $dat[15] $dat[16] $dat[17] $dat[18] \n";
 }
--------------------------------------------------------------