Re: DataObjects: problem connecting to postgres
| From: | George Essig | Date: | Fri, 28 Mar 2003 15:23:38 +0000 |
| Subject: | Re: DataObjects: problem connecting to postgres | ||
| Groups: | php.pear.dev php.pear.general | ||
| Request: | Send a blank email to pear-dev+get-14712@lists.php.net to get a copy of this message | ||
I had trouble at first also. I eventually got something to work. I had to start PostgreSQL's
postmaster with the -i switch to enable clients to connect via TCP/IP. By default, UNIX domain
sockets are used. If you are using a Red Hat RPM, you have to edit /etc/rc.d/init.d/postgresql to
add -o '-i' immediately after the pg_ctl command. Below is an example:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -o '-i' -D $PGDATA -p
/usr/bin/postmaster start >
/dev/null 2>&1" < /dev/null
In DataObjects.ini, I used the following.
database = pgsql://USERNAME:PASSWORD@unix+localhost/DATABASE
Change USERNAME, PASSWORD, and DATABASE as needed.
George Essig
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com