[GENERAL] postgres connection problem via python pg DBI

2008-06-05 Thread Dan Joo
Hi all, I have a problem connecting to postgres via the python pg module ONLY from the cgi-scripts. The command is: db=pg.connect('aqdev','localhost',5432,None,None,'postgres',None) From the commandline the connection works great, but from a cgi-script it barfs with the following

Re: [GENERAL] postgres connection problem via python pg DBI

2008-06-05 Thread Dan Joo
Just solved it. For others, here is the solution. setsebool -P httpd_can_network_connect_db 1 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Joo Sent: Thursday, June 05, 2008 4:18 PM To: pgsql-general@postgresql.org Subject: [GENERAL] postgres connection problem

Re: [GENERAL] postgres connection problem via python pg DBI

2008-06-05 Thread Colin Wetherbee
Dan Joo wrote: db=pg.connect('aqdev','localhost',5432,None,None,'postgres',None) From the commandline the connection works great, but from a cgi-script it barfs with the following message: *InternalError*: could not create socket: Permission denied My (obvious, granted) guess is that you're