RE:Perl Script and Postgres DB running via Apache Web

From: bangh <banghe(at)baileylink(dot)net>
To: pgsql-admin(at)hub(dot)org
Subject: RE:Perl Script and Postgres DB running via Apache Web
Date: 2000-02-29 18:07:45
Message-ID: 38BC0AF1.40834E8A@baileylink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
I think the problem is the web process user.

The cgi script is run in name of the web process, you should check what
name is assigned for your web process, normally it is named as nobody,
webwww, then
grant access privileges (like select, insert, delete) on that table to
your web process.

--
Banghe

Hi...
>>
p> I have the following Perl Script (with Postgres code):
>>
p> #!/usr/bin/perl -w
p> use Pg;
>>
p> print "<HTML><P>This is a test</HTML"
>>
p> $conn = Pg::connectdb("dbname=test");
p> $conn->exec("insert into test_table values ('Carla', '90')");
>>
p> This Script will run from the command line, and inserts values into
the
p> existing DB and table.
p> When it is run via the web browser, nothing happens (browser hangs).
>>
p> The script is in the /usr/local/httpd/cgi-bin directory, owned by a
user
p> (not root), and has 755 permissions.
>>
p> We have exhaustively searched perl, cgi, postgres, and apache
p> documentation both printed and web-based,
p> and cannot determine how to correct this problem.
>>
p> We suspect that it may be a permissions / execution rights for the
httpd,
p> but we are stumped.
>>
p> Any help will be greatly appreciated.
>>
p> Thanks,
p> -Carla and Chris :)
p> ________________________________________________________________
p> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
p> Juno now offers FREE Internet Access!
p> Try it today - there's no risk! For your FREE software, visit:
p> http://dl.www.juno.com/get/tagj.
>>

Browse pgsql-admin by date

  From Date Subject
Next Message Andre Antonio Parmeggiani 2000-02-29 21:48:18 IPC problems with Linux 2.0.36
Previous Message Mark Dalphin 2000-02-29 17:23:17 Re: Perl Script and Postgres DB running via Apache Web Server