Quick question about compiling PHP with PostgreSQL support
The PHP.net webpage states
"In order to enable PostgreSQL support, --with-pgsql[=DIR] is required when you compile PHP. DIR is the PostgreSQL base install directory, defaults to /usr/local/pgsql." The only problem is that I can't find where my PostgreSQL base install directory is. It was installed as a package with Debians package manager (apt-get). When I do a "find" for postgres, or psql or pgsql, the files are scattered all over the place. I understand that if I had compiled from source, the base install directory would be "/usr/local/pgsql" /usr/bin/psql allows me to connect to the database. Should I point to here? Can someone please point me in the right direction? |
Is there a /usr/local/pgsql directory? If so, use that...
|
Quote:
frost:/usr/local# ls apache2 bin games include lib man php sbin share src Here are the results of locate and find frost:/usr/local# locate pgsql /usr/lib/postgresql/lib/plpgsql.so /usr/local/php/include/php/ext/pgsql /usr/local/php/include/php/ext/pgsql/php_pgsql.h /var/cache/apt/archives/php4-pgsql_3%3a4.3.9-1_i386.deb /var/lib/dpkg/info/php4-pgsql.list /var/lib/dpkg/info/php4-pgsql.postrm frost:/usr/local# find / -name pgsql /usr/local/php/include/php/ext/pgsql /martin/php-4.4.6/ext/pgsql |
Looking at my PostgreSQL installation (to /usr/local/pg-8.2/ ) from source, the file plpgsql.so is in /usr/local/pg-8.2/lib/postgresql/ so I'd be guessing you want to use /usr/lib/postgresql/lib/ as your directory... That's the only file I could find in common with your 'locate' output :)
|
Quote:
It looks like the packaged versions of PostgreSQL in Debian fail to come with pg_config. PHP needs this file because pg_config gives information about the postgresql install. Anyway, looks like I will have to install PostgreSQL from source. Thanks anyway. Martin |
Which packages *did* you install? Mine on etch does have pg_config,
and it has the headers, too. That said, there's a PHP postgres package available as well. Code:
apt-cache search php | grep -i postgr Cheers, Tink |
Quote:
|
So all has fallen into place, then? :)
Cheers, Tink |
All times are GMT -5. The time now is 11:36 PM. |