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: Michael Peppler <mpeppler at MBAY dot NET>
Subject: problems with ct_execute
Date: Nov 27 1998 4:45PM

Jason Risley writes:
 > I am having troubles with ct_execute in a cgi script within Apache 1.3.3 on
 > NT. At the Command prompt, everything works just fine. But when I execute
 > this via Apache as a cgi script, I get the the following returned to the
 > browser:
 > 
 > 
 > 
 > I do not get any messages in Apache's error.log. Has anyone encountered this
 > problem and/or know how to solve the situation?

My guess is that the SYBASE environment variable isn't set right..

BTW - is the server really called 'sa'?

Michael

 > 
 > Thanks
 > Jason
 > 
 > The following is my perl script....
 > 
 > #!C:/sybperl/bin/perl.exe
 > 
 > 	use CGI::Switch;
 > 	use Sybase::CTlib;
 > 
 > 	$uid = 'sa';
 > 	$pwd = 'sa';
 > 	$srv = 'sa';
 > 	$charset = 'cp850';
 > 
 > 	$! = 1;
 > 	print "Content-type: text/html\n\n";
 > 	print "\n";
 > 
 > 	$db=Sybase::CTlib->ct_connect($uid, $pwd, $srv, $charset);
 > 	$db->ct_execute("select uid, name from sysusers");
 > 	while ( $db->ct_results($result) == CS_SUCCEED) {
 > 	    next unless $db->ct_fetchable($result);
 > 	    while ( ($uid, $name) = $db->ct_fetch ) {
 >       	  print "$uid - $name\n";
 > 	    }
 > 	}
 > 
 > 	print "\n";
 > 
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com