|
|
sybperl-l Archive
Up Prev Next
From: Andrei Nossov <anossov at yahoo dot com>
Subject: Re: Help! SybPerl script doesn't run as CGI
Date: Oct 1 1999 12:28AM
On HP-UX it's not LD_LIBRARY_PATH, it's SHLIB_PATH. My
$0.02..
- Andrei
--- Pradeep Bhaskaran wrote:
> Hi All,
>
> I had recently successfull built and installed a
> dynamically linked version of Perl,Sybperl on HP-UX.
>
> We have Netscape Enterprise Server 2.0 & HP-UX 10.20
> A. I am trying to access a SYBASE database on
> another
> HP system through perl. When I run the following
> script at the unix prompt it works fine but when I
> try
> to access it from the browser it doesn't work. I
> checked the servers error log and it says:
>
> *******
> failure: trying to GET /cgi-bin/simquery.cgi,
> cgi-parse-output reports: the CGI prog
> ram /pfact/ns-public/cgi-bin/sysquery.cgi did not
> produce a valid header (name without value: got line
> "
> could not open interface file.")
> *******
>
> The permisssions for the interfaces file is ok. I
> checked the SYBASE envoironment variable and it is
> set
> correctly. LD_LIBRARY_PATH variable is not set on my
> system but the path specified during compilation is
> still correct. I tried setting it in a wrapper shell
> script and executing the perl script it still didn't
> work. I even tried setting it in the script itself.
> I
> am able to run other perl script forms which do not
> have Sybperl modules as cgi.
>
> I'm not sure whether I have the LD_LIBRARY_PATH
> problem. If possible for Netscape Enterprise Server
> how do I set the LD_LIBRARY_PATH at the http server
> configuration level?
>
> Heres the script --
>
#!/pfact/ns-public/docs/associates/pradeep/perl5/bin/perl
> -w
> use strict;
>
> #print $ENV{LD_LIBRARY_PATH};
>
> BEGIN {
> $ENV{LD_LIBRARY_PATH} =
> '/opt/sybase/XI/lib';
> }
> use Sybase::DBlib;
>
> #print $ENV{LD_LIBRARY_PATH};
>
> my $dbh = new Sybase::DBlib
> 'dddd','dddd','NSYT500DEV';
> my $data = $dbh->sql("select suid, uid, gid, name
> from
> sysusers", undef, TRUE);
>
> print "Content-type:text/html\n\n";
> print "Test Page";
> print "";
>
> print "\n";
> my $first = 1;
> foreach my $row (@$data) {
> if($first) {
> print "\n";
> foreach (sort keys(%$row)) {
> print "| $_ | ";
> }
> print " \n";
> $first = 0;
> }
> print "\n";
> foreach (sort keys(%$row)) {
> if($_ eq 'name') {
> print "|
href=sysusers.cgi?__state=1&name=$row->{name}>$row->{$_} | ";
> } else {
> print "$row->{$_} | ";
> }
>
> }
> print " \n";
> }
> print " \n";
>
> print "\n";
>
> Please Help!
>
> Pradeep
>
> =====
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
>
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
|