pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
phpinfo() doesn't show postgres as a configured module
5+ messages / 5 participants
[nested] [flat]

* phpinfo() doesn't show postgres as a configured module
@ 2009-04-11 00:27  my extraidentity <myextraidentity@hotmail.com>
  0 siblings, 3 replies; 5+ messages in thread

From: my extraidentity @ 2009-04-11 00:27 UTC (permalink / raw)
  To: pgsql-php



    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.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009=

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: phpinfo() doesn't show postgres as a configured module
@ 2009-04-11 00:37  Andrew McMillan <andrew@morphoss.com>
  parent: my extraidentity <myextraidentity@hotmail.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Andrew McMillan @ 2009-04-11 00:37 UTC (permalink / raw)
  To: my extraidentity <myextraidentity@hotmail.com>; +Cc: pgsql-php

On Fri, 2009-04-10 at 19:27 -0500, 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?

You need to enable it in your php.ini file as an extension, like:

extension=pgsql.so

Cheers,
					Andrew.

------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com                            +64(272)DEBIAN
                    Be cheerful while you are alive.
                    -- Phathotep, 24th Century B.C.

------------------------------------------------------------------------





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: phpinfo() doesn't show postgres as a configured module
@ 2009-04-11 00:55  Steve Crawford <scrawford@pinpointresearch.com>
  parent: my extraidentity <myextraidentity@hotmail.com>
  2 siblings, 1 reply; 5+ messages in thread

From: Steve Crawford @ 2009-04-11 00:55 UTC (permalink / raw)
  To: my extraidentity <myextraidentity@hotmail.com>; +Cc: pgsql-php

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?
>
Multiple things, possibly. What OS and how did you install PHP and PG?

I'll venture a guess that you somehow installed PHP and/or PG with 
whatever system installer your disro uses (yum? apt?...) and it ended up 
wherever that distro specifies. Then you compiled some stuff from source 
and it ended up in the "normal" locations defined by the source/makefile 
defaults and you have ended up with two or more versions (5.0.4/5.2.8) 
of PHP. You could even end up with Apache seeing one version and PHP 
command-line seeing a different one. Once you sort that out, be sure to 
enable PG in php.ini.

Cheers,
Steve



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: phpinfo() doesn't show postgres as a configured module
@ 2009-04-11 02:01  Bob McConnell <rmcconne@lightlink.com>
  parent: Steve Crawford <scrawford@pinpointresearch.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Bob McConnell @ 2009-04-11 02:01 UTC (permalink / raw)
  To: pgsql-php

Steve Crawford wrote:
> 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?
>>
> Multiple things, possibly. What OS and how did you install PHP and PG?
> 
> I'll venture a guess that you somehow installed PHP and/or PG with 
> whatever system installer your disro uses (yum? apt?...) and it ended up 
> wherever that distro specifies. Then you compiled some stuff from source 
> and it ended up in the "normal" locations defined by the source/makefile 
> defaults and you have ended up with two or more versions (5.0.4/5.2.8) 
> of PHP. You could even end up with Apache seeing one version and PHP 
> command-line seeing a different one. Once you sort that out, be sure to 
> enable PG in php.ini.
> 
> Cheers,
> Steve

If phpinfo() doesn't show the Postgres options, it was compiled without 
them. That's the same problem I have with Slackware. The packaged 
version of PHP only includes the MySQL addictionware. No matter what I 
do, I can't get it configured my way. So I don't install those packages, 
but get the source for Apache, PHP and Postgres. That's the only way I 
can make sure they get compiled and installed with my choice of options, 
not those of someone with a hidden agenda trying to promote an inferior 
product.

Bob McConnell
N2SPP




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: phpinfo() doesn't show postgres as a configured module
@ 2009-04-16 22:55  Brian Fehrle <brianf@consistentstate.com>
  parent: my extraidentity <myextraidentity@hotmail.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Brian Fehrle @ 2009-04-16 22:55 UTC (permalink / raw)
  To: 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:
USE="stuffystuff"
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,
             Brian

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. 
> <http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009;



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2009-04-16 22:55 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-04-11 00:27 phpinfo() doesn't show postgres as a configured module my extraidentity <myextraidentity@hotmail.com>
2009-04-11 00:37 ` Andrew McMillan <andrew@morphoss.com>
2009-04-11 00:55 ` Steve Crawford <scrawford@pinpointresearch.com>
2009-04-11 02:01   ` Bob McConnell <rmcconne@lightlink.com>
2009-04-16 22:55 ` Brian Fehrle <brianf@consistentstate.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox