LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2007, 10:38 PM   #1
JellyStones
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian 3.1
Posts: 10

Rep: Reputation: 0
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?
 
Old 03-09-2007, 03:54 AM   #2
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
Is there a /usr/local/pgsql directory? If so, use that...
 
Old 03-09-2007, 06:39 AM   #3
JellyStones
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian 3.1
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fukawi2
Is there a /usr/local/pgsql directory? If so, use that...
Unfortunately no.


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
 
Old 03-09-2007, 07:42 AM   #4
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
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
 
Old 03-09-2007, 04:16 PM   #5
JellyStones
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian 3.1
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fukawi2
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.

Thanks anyway.

Martin
 
Old 03-14-2007, 04:10 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 03-14-2007, 04:20 PM   #7
JellyStones
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian 3.1
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster
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.
 
Old 03-14-2007, 08:02 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
So all has fallen into place, then? :)


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick VIA chipset question, Support for K8T890 ? byteframe Linux - Hardware 20 03-04-2007 12:36 AM
Compiling php with oracle support fintan Linux - Software 1 12-31-2006 12:34 PM
Quick question: Compiling a kernel to be used on another machine Fenster Fedora 2 07-15-2006 05:44 PM
Very quick php question! orange400 Programming 4 06-18-2004 09:37 PM
Trouble compiling JPEG support with PHP MusicmanAN Programming 0 05-13-2001 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration