By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

PostgreSQL connection in CGI-PERL Script

P: 1
Hi,

I am trying to develop user interface in CGI-PERL using CGI.pm module with DBI.pm module.

while a form value is submitted to cgi program it is showing follwoing error
"Couldn't connect to db1:5432/tcp: IO::Socket::INET: Permission denied at /usr/lib/perl5/site_perl/5.8.8/DBD/PgPP.pm line 124"

Code is below

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl -w
  2. use strict;
  3. use CGI qw/:standard/;
  4. use CGI qw/param/;
  5. CGI->nosticky();
  6. use CGI::Carp qw/warningsToBrowser fatalsToBrowser/;
  7. use DBI;
  8.  
  9. my $dbh=DBI->connect("DBI:PgPP:dbname=vidb05;host=db1;port=5432","vidb","",{AutoCommit=>0}) or die $DBI::errstr;
  10.  
can you please suggest me the actual problem with this code.

Thanks,
Ram Vinay Pandey
Feb 6 '08 #1
Share this Question
Share on Google+
1 Reply


debasisdas
Expert 5K+
P: 8,127
Please check here for the connection strings.
Feb 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.