J
Jason
All of the cgi scripts I create to access postgres databases work from
the command line but do not work as CGI scripts. When accessed from a
browser the following line:
my $dbh =
DBI->connect( dbig:dbname=$DatabaseName;host=localhost;port=5432;",
"postgres","mydog")
Produces the following error:
[Thu Jul 28 23:14:45 2005] [error] [client 207.161.60.253] DBI
connect('dbname=myRunningData;host=localhost;port=5432;' ,
'postgres',...) failed: could not create socket: Permission denied
I have tried to establish different identity rules for apache and have
ensured that the password for postgres is correct.
I am currently running Fedora Core 3 with
Postgresql 7.4.8-1.FC3.1
Apache 2.0.52-3.1
perl 5.8.5-14.FC3
DBD:g 1.43
The lines below show my postgres config files.
Thanks in advance.
Jason
pg_hba.conf:
host all all 127.0.0.1 255.255.255.255
trust
local all all ident sameuser
postgresql.conf (relavant portions)
tcpip_socket = true
max_connections = 100
# note: increasing max_connections costs about 500 bytes of
shared
# memory per connection slot, in addition to costs from
shared_buffers
# and max_locks_per_transaction.
#superuser_reserved_connections = 2
port = 5432
#unix_socket_directory = ''
#unix_socket_group = ''
unix_socket_permissions = 0777 # octal
the command line but do not work as CGI scripts. When accessed from a
browser the following line:
my $dbh =
DBI->connect( dbig:dbname=$DatabaseName;host=localhost;port=5432;",
"postgres","mydog")
Produces the following error:
[Thu Jul 28 23:14:45 2005] [error] [client 207.161.60.253] DBI
connect('dbname=myRunningData;host=localhost;port=5432;' ,
'postgres',...) failed: could not create socket: Permission denied
I have tried to establish different identity rules for apache and have
ensured that the password for postgres is correct.
I am currently running Fedora Core 3 with
Postgresql 7.4.8-1.FC3.1
Apache 2.0.52-3.1
perl 5.8.5-14.FC3
DBD:g 1.43
The lines below show my postgres config files.
Thanks in advance.
Jason
pg_hba.conf:
host all all 127.0.0.1 255.255.255.255
trust
local all all ident sameuser
postgresql.conf (relavant portions)
tcpip_socket = true
max_connections = 100
# note: increasing max_connections costs about 500 bytes of
shared
# memory per connection slot, in addition to costs from
shared_buffers
# and max_locks_per_transaction.
#superuser_reserved_connections = 2
port = 5432
#unix_socket_directory = ''
#unix_socket_group = ''
unix_socket_permissions = 0777 # octal