Thread: BUG #3934: Connection error in CGI Script

BUG #3934: Connection error in CGI Script

From
"Ram Vinay Pandey"
Date:
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;;
###################################################