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: Yao Fei <yaofei at usa dot net>
Subject: sybperl on RH5.1
Date: Jun 23 1998 6:00AM

I've installed  SybPerl 2.09.05 on a RedHat 5.1 Linux box, with dynamic
Sybase CTlib, then I moved some simple CGIs  from my old Slackware 3.4
WWW server to this new one.

But now I can't run them!

If I run this small scripts (mostly is very simple query , such as
'SELECT * FROM.." in command line, it works fine.

If I get rid off the "use Sybase::CTlib;" , it works, but can't access
the backend MS SQL Server 6.5 .

Apache's error message is

[Tue Jun 23 02:12:08 1998] access to /home/httpd/cgi-bin/ failed
for, reason: Premature end of script headers

My scripts is
use Sybase::CTlib;

my $dbh = new Sybase::CTlib('sa', '', 'PROSERVER');

$dbh->ct_sql("use HangTian");

my $sql = 'SELECT * FROM QuesAnsw
          WHERE id < 1005 ';
my @rows = $dbh->ct_sql($sql);

my $thisrow;
foreach $thisrow (@rows) {
        print ${$thisrow}[1]." ---- ".${$thisrow}[2]."\n" ;

Oh help me.

Yao Fei.