|
|
sybperl-l Archive
Up Prev Next
From: "Arndt-Kohlway, Chris" <CArndt at LeggMason dot com>
Subject: SybPerl under CGI
Date: Feb 11 1999 1:54PM
I'm sure this question has been asked and solved before, but I am new to
the group.
I am running SybPerl 2.10 (dynamically loaded) under Perl 5.005_002 on
an AIX4.3.2 system. Everything worrks great when I run the Perl cscript
from the command line, but when I try to call a Perl program from a web
page using CGI, it fails with the following message:
Open Client Message: Message number: LAYER = (5) ORIGIN = (3) SEVERITY =
(5) NUMBER = (131) Message String: ct_init(): network packet layer:
internal net library error: Netlib state error - Netlib initialization
may have failed Sybase::CTlib initialize: ct_init() failed at
/usr/local/lib/perl5/5.00502/aix/DynaLoader.pm line 187. BEGIN
failed--compilation aborted at /usr/local/etc/httpd/cgi-bin/x.tap line
4.
The program is as follows:
#!/usr/bin/perl
$ENV{"SYBASE"} = "/usr/sybase11";
$ENV{"DSQUERY"} = "epm_mgmt";
use Sybase::CTlib;
use CGI qw(:standard);
print header;
print start_html("Test of Disk Query");
while (($key, $value) = each %ENV) {
print ("$key, $value\n");
};
$d = new Sybase::CTlib mylogin, mypassword, epm_mgmt;
sub print_result {
%row = @_;
print "$row{vg_name}\n";
}
$ct_cmdline = sprintf("select * from unixadm..vg where host_sys_name =
\"%s\"", "aixprod2");
$ref = $d->ct_sql($ct_cmdline, \&print_result, CS_TRUE);
print end_html;
Does anyone know what might be causing the problem. Is it due to the
dynamic load? If so, how do I change back to static.
Many thanks in advance,
Chris Arndt-Kohlway
Legg Mason Wood Walker
|