PHP4 Not Seeing PostgreSQL 7.2
| From: | Eric | Date: | Sun, 21 Jul 2002 15:09:41 +0000 |
| Subject: | PHP4 Not Seeing PostgreSQL 7.2 | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20677@lists.php.net to get a copy of this message | ||
Can someone please tell me what the hell I am doing wrong. (2 days of no
success = very frustrated).
PGSQL is up and running no problem. I start it with:
postmaster -D /path/to/data/cluster -i &
I can connect to the postgresql v.7.2.1 database from remote workstations
and execute queries no problem.
In my php code I have tried:
dl("pgsql.so") even though there is no pgsql.so on the server.
I have installed both Postgres7.2 and PHP4 from source. Where does pgsql.so
come from? (PHP or Postgre compile?)
Tried to copy the /lib/libpgsql.2.2.so into place and rename. PHP erros out
that
pgsql.so is not a valid PHP library. (Kind of suspected this would happen).
Tried include("DB/pgsql.php") and this gives endless errors
about class db_common can't inherit etc...
Isn't there any clear cut examples or step-by-step how tos?
What am I missing here?
By the way, I have set the LD_LIBRARY_PATH and I have included
/usr/local/pgsql/lib
path in /etc/ld.so.conf.
Compiled PHP4 as follows:
./configure --enable-track-vars --with-gettext --enable-force-cgi-redirect
--with-apache=../apache_1.3.26 --without-mysql
--with-pgsql=/usr/local/pgql
PHP code is working with Apache because other things work. Just that
pg_connect() is always 'unknown function'.
Here is how apache was compiled:
./configure --enable-module=so --activate-module=src/modules/php4/libphp4.a
--enable-module=php4
Suggestions and help are very greatly appreciated!
Eric