php 4.2 postgresql 7.3 help

Started by Randall Smithabout 23 years ago4 messagesgeneral
Jump to latest
#1Randall Smith
netmail@tnr.cc

I'm using the redhat 8 php 4.2.2 installation and postgresql 7.3.1 rpm
from here:
ftp://ftp10.us.postgresql.org/pub/postgresql/binary/v7.3.1/RPMS/redhat-8.0

After upgrading to postgresql 7.3, my php-postgresql (pgsql.so)
extension will not load. This is the error in my apache error log:

PHP Warning: Unable to load dynamic library '/usr/lib/php4/pgsql.so' -
libpq.so.2: cannot open shared object file: No such file or directory in
Unknown on line 0

I looked for libpq.so.2 and could not find it, but I did find libpq.so.3
and libpq.so.3.0 in /usr/lib. I guess libpq.so.3 is from the postgresql
upgrade.

I know that I could probably downgrade to postgresql 7.2, but I would
like to keep 7.3 if possible. (I like the new drop column feature).

Any help would be much appreciated.

Randall

#2Doug McNaught
doug@mcnaught.org
In reply to: Randall Smith (#1)
Re: php 4.2 postgresql 7.3 help

Randall Smith <netmail@tnr.cc> writes:

I'm using the redhat 8 php 4.2.2 installation and postgresql 7.3.1 rpm
from here:
ftp://ftp10.us.postgresql.org/pub/postgresql/binary/v7.3.1/RPMS/redhat-8.0

After upgrading to postgresql 7.3, my php-postgresql (pgsql.so)
extension will not load. This is the error in my apache error log:

PHP Warning: Unable to load dynamic library '/usr/lib/php4/pgsql.so'
-
libpq.so.2: cannot open shared object file: No such file or directory
in Unknown on line 0

You'll need to recompile PHP against the 7.3 headers and libraries.

-Doug

#3Nick Gazaloff
nick@sbin.org
In reply to: Doug McNaught (#2)
Re: php 4.2 postgresql 7.3 help

On 2 Feb 2003, Doug McNaught wrote:

Randall Smith <netmail@tnr.cc> writes:

I'm using the redhat 8 php 4.2.2 installation and postgresql 7.3.1 rpm
from here:
ftp://ftp10.us.postgresql.org/pub/postgresql/binary/v7.3.1/RPMS/redhat-8.0

After upgrading to postgresql 7.3, my php-postgresql (pgsql.so)
extension will not load. This is the error in my apache error log:

PHP Warning: Unable to load dynamic library '/usr/lib/php4/pgsql.so'
-
libpq.so.2: cannot open shared object file: No such file or directory
in Unknown on line 0

You'll need to recompile PHP against the 7.3 headers and libraries.

No, it's possible to create a link like this:

cd $PGHOME/lib
ln -s libpq.so.3 libpq.so.2
ldconfig

--

Best regards,
Nick
(GPG Key ID: 4396B2D0, fingerprint: 648E C3FE ACF6 A730 FF52 D717 776D 1CB0 4396 B2D0)

#4Oliver Elphick
olly@lfix.co.uk
In reply to: Nick Gazaloff (#3)
Re: php 4.2 postgresql 7.3 help

On Sun, 2003-02-02 at 21:15, Nick Gazaloff wrote:

You'll need to recompile PHP against the 7.3 headers and libraries.

No, it's possible to create a link like this:

cd $PGHOME/lib
ln -s libpq.so.3 libpq.so.2
ldconfig

It's possible, but it's a horrible kludge. The API has changed, so the
library has a different soname. That is deliberate; a program that has
been built with one version of the library will not necessarily work
with a different version; you could cause segfaults or other unexpected
results.

The proper solution is to update the PHP program or to install an older
version of the library - you can extract one from a binary distribution
of 7.2.x, or build 7.2.4 from source.

Two different versions of the library can coexist; the newer one should
be linked to libpq.so, for compiling new programs.

--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Love not the world, neither the things that are in the
world. If any man love the world, the love of the
Father is not in him...And the world passeth away, and
the lust thereof; but he that doeth the will of God
abideth for ever." I John 2:15,17