BUG #3934: Connection error in CGI Script

From: "Ram Vinay Pandey" <ramvinayp(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3934: Connection error in CGI Script
Date: 2008-02-06 04:46:05
Message-ID: 200802060446.m164k55S034720@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3934
Logged by: Ram Vinay Pandey
Email address: ramvinayp(at)gmail(dot)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;;
###################################################

Browse pgsql-bugs by date

  From Date Subject
Next Message Vaibhav More 2008-02-06 06:11:24 BUG #3935: about Unicode values
Previous Message Tom Lane 2008-02-05 21:54:19 Re: BUG #3928: INFORMATION_SCHEMA does not give results if a user is allowed only access via ROLE