Click to See Complete Forum and Search --> : How to get PostgreSQL support w/PHP
pablogosse
12-16-2002, 11:20 PM
Hi all. I've been given a laptop with RedHat 8.0 and PHP installed, but I need to get PostgreSQL support going, other than what is provided with dbx (I'm using ADOdb).
Do I need to recompile PHP (it, Apache and PostgreSQL were all installed straight from the RedHat cd) in order to get PostgreSQL support?
Thanks in advance,
Pablo
You need to have the php rpm installed as well as a php-pgsql-*.i386.rpm package to enable postgres support in php! Good luck...
pablogosse
12-17-2002, 11:14 AM
Well, I managed to get postgresq support (uncommented pgsql.so and made sure I had the pgsql.so file present), but now I can't get it to connect. Grrrr......
Originally posted by pablogosse
Well, I managed to get postgresq support (uncommented pgsql.so and made sure I had the pgsql.so file present), but now I can't get it to connect. Grrrr......
Did it give you any error message? What user are you connecting to the database?
pablogosse
12-17-2002, 02:06 PM
Okay, after much frustration, cursing, smoking, and being brought almost to the point of beating the laptop to a pulp, everything works.
What needed to be changed was the following.
- php.ini need to be chowned to the user nobody
- need to install the pgsql.so file and uncomment that line in php.ini
- needed to set tcpip_socket to true in postgreSQL.conf
- needed to add an entry for 127.0.0.1 in pg_hba.conf
and then everything works........
P.
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.