Thread: PHP libpq Version != Actual PGSQL Version

PHP libpq Version != Actual PGSQL Version

From
Date:
hi all,

i noticed today that phpinfo() displays:

PostgreSQL(libpq) Version     8.0.1

the strange thing is that i upgraded to 8.1.

shouldn't it display 8.1 instead of 8.0.1?

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: PHP libpq Version != Actual PGSQL Version

From
Tom Lane
Date:
<operationsengineer1@yahoo.com> writes:
> i noticed today that phpinfo() displays:
> PostgreSQL(libpq) Version     8.0.1
> the strange thing is that i upgraded to 8.1.
> shouldn't it display 8.1 instead of 8.0.1?

I don't know anything about php, but I'd sure bet that this means your
php is still running atop an 8.0.1 version of libpq ... better look into
it.

            regards, tom lane

Re: PHP libpq Version != Actual PGSQL Version

From
John DeSoi
Date:
On Mar 28, 2006, at 10:18 PM, <operationsengineer1@yahoo.com>
<operationsengineer1@yahoo.com> wrote:

> i noticed today that phpinfo() displays:
>
> PostgreSQL(libpq) Version     8.0.1
>
> the strange thing is that i upgraded to 8.1.
>
> shouldn't it display 8.1 instead of 8.0.1?

In general, no. Unless you compiled PHP yourself, it uses whatever
version of libpq was available at build time. For example, on OS X my
PHP library has no dynamic references for libpq. PostgreSQL support
was compiled in when PHP was built and changing the PostgreSQL
version on my computer has no impact.




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: PHP libpq Version != Actual PGSQL Version

From
Date:
--- John DeSoi <desoi@pgedit.com> wrote:

>
> On Mar 28, 2006, at 10:18 PM,
> <operationsengineer1@yahoo.com>
> <operationsengineer1@yahoo.com> wrote:
>
> > i noticed today that phpinfo() displays:
> >
> > PostgreSQL(libpq) Version     8.0.1
> >
> > the strange thing is that i upgraded to 8.1.
> >
> > shouldn't it display 8.1 instead of 8.0.1?
>
> In general, no. Unless you compiled PHP yourself, it
> uses whatever
> version of libpq was available at build time. For
> example, on OS X my
> PHP library has no dynamic references for libpq.
> PostgreSQL support
> was compiled in when PHP was built and changing the
> PostgreSQL
> version on my computer has no impact.
>
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL

John, Tom or anyone else,

is this a problem (are there any effects?  do i lose
8.1 functionality or security?)  do i need to monitor
when php5 incorporates 8.1 libpq and upgrade php again
or is it not too big a deal since my winxp service
claims to be pgsql 8.1.

ps - this is on my winxp dev box.

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: PHP libpq Version != Actual PGSQL Version

From
John DeSoi
Date:
On Mar 29, 2006, at 11:42 AM, <operationsengineer1@yahoo.com>
<operationsengineer1@yahoo.com> wrote:

> is this a problem (are there any effects?  do i lose
> 8.1 functionality or security?)  do i need to monitor
> when php5 incorporates 8.1 libpq and upgrade php again
> or is it not too big a deal since my winxp service
> claims to be pgsql 8.1.
>
> ps - this is on my winxp dev box.

libpq 8.0 should be able to talk to PostgreSQL 8.1 without any
problems. As far as features/security goes, you would have to check
the differences between 8.0/8.1 libpq.

I think you'll be better off monitoring PHP's PostgreSQL functions
and upgrading when there are changes you want. In particular, PHP 5.1
adds support for PostgreSQL prepared statements which is a big win
for both security and functionality.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL