|
|
sybperl-l Archive
Up Prev Next
From: "Sheree Hemphill" <sah18 at po dot cwru dot edu>
Subject: basic sybperl/cgi question
Date: Jun 3 1999 1:48PM
I am new to both SybPerl and CGI, so my apologies in advance. I was able to
make a successful connection to my using SybPerl CTlib with the following
syntax:
use Sybase::CTlib;
$dbh = new Sybase::CTlib 'loginid', 'password', 'dbservername';
$dbh->ct_sql("use dbname");
I did this in a perl program run from a prompt (unix platform).
However, when I copy these same lines into a perl cgi program, I get an
error message in return (the cgi form displayed properly prior to my adding
the above 3 lines, now it won't display at all). Here is the exact code:
#!/usr/local/bin/perl
use CGI qw/:standard/;
use Sybase::CTlib;
$dbh = new Sybase::CTlib 'loginid', 'password', 'dbservername';
$dbh->ct_sql("use dbname");
print header,
start_html('Variation DB'),
h1('Variation DB Query Form'),
start_form,
"Choose Search Field: ",
popup_menu( -name=>'field',
-values=>['AC','x','y','z']),p,
"Enter Value: ",textfield('acvalue'),p,
submit,
end_form,
hr;
if (param()) {
print "The accession number you enterred is: ",em(param('acvalue')),p,
hr;
}
The error that is returned when I try to run the cgi program in the browser
is:
at /var/www/htdocs/helix/cgi-bin/sah18/snp/acpage.cgi line 5 BEGIN
failed--compilation aborted at
/var/www/htdocs/helix/cgi-bin/sah18/snp/acpage.cgi line 5.
Any ideas on why this is erroring out?
Thank you for you help.
Sheree
|