Joe Koenig <joe@jwebmedia.com> writes:
> Alright, I've got that taken care of now. Thanks to everyone who
> responded. Next dumb question - I need to be able to connect to postgres
> from PHP - I know that I need to start it up with the '-i' option, but I
> need to make sure it starts up with that option when the machine
> reboots.
Are you sure? If PHP uses libpq than it should be able to use Unix
domain sockets (on the same machine of course).
> I found the 010.pgsql.sh file and it says to edit
> $PG_DATA/postgresql.conf - so I went to my data dir and uncommented the
> line that said 'tcpip_socket = false' and changed it to true. When
> trying to connect from PHP, I get an error stating:
>
> Warning: Unable to connect to PostgreSQL server: pqReadData() -- backend
> closed the channel unexpectedly. This probably means the backend
> terminated abnormally before or while processing the request.
Well, this is either a backend crash (bad) or possibly an
authentication failure. What do your logs say? Are there any core
files in $PGDATA?
-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863