Thread: Why cant I load Pg module from my perl CGI under IIS?

Why cant I load Pg module from my perl CGI under IIS?

From
Rishi Sharma
Date:
I can run the following test script in a dos shell by typing:
>perl test.pl

Contents of test.pl:
#!/usr/bin/perl
# -*- perl -*-   to tell emacs that this is a perl script

## uncomment for cgi ###
#use CGI;
#print header;

use Pg;

$conn = Pg::connectdb("dbname=intake");

$status=$conn->status;
if ($status != PGRES_CONNECTION_OK) {
    print STDERR "Error fatal en la conexion ($status), terminamos\n";
    exit (1);
}

    Pg::doQuery($conn, " select * from tbl_checklist", \@arreglo);
    foreach my $i (0 .. $#arreglo) {
        foreach my $j (0 .. $#{$arreglo[$i]}) {
            print "$arreglo[$i][$j]\t";
        }
        print "\n";
    }
exit (0);


however, when I convert to cgi this script, it just hangs in my browser.
What could be wrong with my IIS environment.  The system has all the path,
ld_library_path, pgdata, pdlib variables set.

How can I test if Pg is infact in my web server's environment.

Best,

Rishi Sharma.


Re: Why cant I load Pg module from my perl CGI under IIS?

From
s0lao@netscape.net (S. L.)
Date:
Rishi Sharma <rsharma@Bigstep.net> wrote:
>
> I can run the following test script in a dos shell by typing:
> >perl test.pl
>
[...]
>
> however, when I convert to cgi this script, it just hangs in my browser.
> What could be wrong with my IIS environment.  The system has all the path,
> ld_library_path, pgdata, pdlib variables set.  
>
> How can I test if Pg is infact in my web server's environment.
>
> Best,
>
> Rishi Sharma.
>
>

Just wondering, IIS hasn't an apache-like ErrorLog configuration directive (checkbox for EventViewer or textfield for
filenameor whatever)? It could ease your pain, as perl certainly errs out the error :)) Why don't you redirect err
(stderr)to a file from the script, anyway ? 

Regards,

                       SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/