BUG #3934: Connection error in CGI Script - Mailing list pgsql-bugs

From Ram Vinay Pandey
Subject BUG #3934: Connection error in CGI Script
Date
Msg-id 200802060446.m164k55S034720@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3934
Logged by:          Ram Vinay Pandey
Email address:      ramvinayp@gmail.com
PostgreSQL version: 8.2
Operating system:   Linux (CentOS)
Description:        Connection error in CGI Script
Details:

Hi,
Hi,

Here I am sending my CGI code which I have written to connect PostgreSQL
database in CGI-PERL program. Same program running on command line terminal
and giving output but while running in browser via HTTP request it is giving
error "could not create socket: Permission denied".

Please provide me some solution.
I shall appreciate prompt reply

###################################################
#!/usr/bin/perl -w
use strict;
use CGI qw/:standard/;
use CGI qw/param/;
CGI->nosticky();
use CGI::Carp qw/warningsToBrowser fatalsToBrowser/;
use DBI;
use DBD::Pg;
my $dbh=DBI->connect("dbi:Pg:dbname='test';host='db1';port=5432","super","")
or die $DBI::errstr;;
###################################################

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3928: INFORMATION_SCHEMA does not give results if a user is allowed only access via ROLE
Next
From: "Vaibhav More"
Date:
Subject: BUG #3935: about Unicode values