Quick question about compiling PHP with PostgreSQL support
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
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.
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
php4-pgsql - PostgreSQL module for php4
php5-pgsql - PostgreSQL module for php5
phppgadmin - Set of PHP scripts to administrate PostgreSQL over the WWW
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
php4-pgsql - PostgreSQL module for php4
php5-pgsql - PostgreSQL module for php5
phppgadmin - Set of PHP scripts to administrate PostgreSQL over the WWW
Cheers,
Tink
Interesting, I guess I will never know why I was missing that file. I just went with Ubuntu 6.06 Server, and used apt-get to install everything =D.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.