|
|
sybperl-l Archive
Up Prev Next
From: "Johnson, Phil" <Phil dot Johnson at fmr dot com>
Subject: Problems with sybperl and web display
Date: Jul 27 1998 3:24PM
For some strange reason my sybperl scripts will no longer display results on
our apache web server.
I can display the output of other scripts, but not the sybperl scripts.
I haven't changed anything on our server and even rebooted it, but with no
avail.
I wrote the following simple script to help me debug this:
#!/usr/local/bin/perl -w
#
use Sybase::DBlib;
print"Before Connect\n";
$d = new Sybase::DBlib 'snm', 'snm', uc($ARGV[0]);
print"After Connect\n";
$ref = $d->sql("exec sgw_status rpc");
print"After execute\n";
foreach $line (@$ref) {
print"@$line\n";
}
This works fine on the command line as user www, but when I run it through
netscape via CGI, I can only display the "Before Connect" and "After
Connect" messages. It won't display the results of the query OR the "After
execute" message. I've also have run the cgi script on the command line
with successful results.
Here's the cgi script:
#!/bin/sh -x
#
echo "Content-type: text/plain"
echo ""
echo ""
gw=`echo $QUERY_STRING | awk -F"=" '{print $2}'`
tmp.pl $gw
I'd appreciate any suggestions on where to look to find the answer to this
problem.
|