Skip site navigation (1) Skip section navigation (2)

Re: phpinfo() doesn't show postgres as a configured module

From: Brian Fehrle <brianf(at)consistentstate(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: phpinfo() doesn't show postgres as a configured module
Date: 2009-04-16 22:55:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
I had this exact same problem too, and a friend and I just got it 
working. I'll show what we did.
I am running Sabayon Linux 4.1 (built on Gentoo)
PHP 5.2.8-r2
Apache 2.2.11
postgresql-server 8.3.5

Obviously it will depend on your configuration/distro/whatnot how you 
can change it, but for me, this is how I fixed it. I'm very new to the 
Linux world so I hope I phrase all this correctly.

First I edited my make file.
    # nano /etc/make.conf
In there is a line:
At the very end I added "postgres" (minus the quotes) to the line, right 
before the last quote. (the line was broken up into multiple lines. Each 
line, except for the last, ends with \, be sure to not change any of that.)
Saved the file.

Then I emerged php and told it to use the make file.
    # emerge -N dev-lang/php
This recompiled my php, took a little while.

When that was done, I restarted the apache server.
    # /etc/init.d/apache2 restart

When it restarted, I ran my php file with phpinfo(); on it and there was 
a new entry for pgsql listed.

I hope this was of some help, I'm sure if you provide some information 
on your installation, someone can help do the same thing on your end.

Good Luck,

my extraidentity wrote:
>     When I run the PHP function phpinfo() on my server that has both
>     Apache and PHP on it, it doesn't show postgres as a configured
>     module.  I am running Apache version 2.0.54 and PHP version 5.2.8
>     (however the phpinfo() function displays that it is version 5.0.4
>     ; what is up with that???)
>     What command do I need to run to get the postgres module to work
>     with PHP?  I have tried to configure the server this way and it
>     didn't seem to fix it:
>     ./configure --with-pgsql=/usr/local/pgsql/
>     --with-apxs2=/usr/local/apache2/bin/apxs
>     make
>     Any ideas what I am doing wrong?
>     -Mark 
> ------------------------------------------------------------------------
> Windows Liveā„¢: Keep your life in sync. Check it out. 
> <>

In response to

pgsql-php by date

Next:From: Piotr MitorajDate: 2009-04-18 13:03:59
Subject: sorting query results
Previous:From: Bob McConnellDate: 2009-04-11 02:01:59
Subject: Re: phpinfo() doesn't show postgres as a configured module

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group