Обсуждение: php4 and postgresql 8.3

Поиск
Список
Период
Сортировка

php4 and postgresql 8.3

От
shadrack
Дата:
My basic question is...are php4 and postgresql 8.3 compatible?
I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
some of those versions are old...its government, and I unfortunately
don't have control over the version.  In fact, I don't even have root
access right now.  But I've got projects waiting to go live if I can
get php and postgresql to talk to each other.
When I try to connect, I get...call to undefined function pg_connect.
When I look in the php.ini file, there is no pgsql.so file, and in the
extension library in /usr/lib/php4...I only see ldap.so.
So do I need to have the IT person download the pgsql-php rpm?  Will
that take care of this?  This might be the only option, so hoepfully
there's something I can do.
Or should I just push to install php5 if they let me?  Will php5 and
postgresql work together inherently?  Or will I need to add modules to
the initial php5 installation?
Thanks for any help!
Shad

Re: php4 and postgresql 8.3

От
Alan Hodgson
Дата:
On Monday 02 March 2009, shadrack <shadkeene@hotmail.com> wrote:
> My basic question is...are php4 and postgresql 8.3 compatible?
> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
> some of those versions are old...its government, and I unfortunately
> don't have control over the version.  In fact, I don't even have root
> access right now.  But I've got projects waiting to go live if I can
> get php and postgresql to talk to each other.
> When I try to connect, I get...call to undefined function pg_connect.
> When I look in the php.ini file, there is no pgsql.so file, and in the
> extension library in /usr/lib/php4...I only see ldap.so.
> So do I need to have the IT person download the pgsql-php rpm?  Will
> that take care of this?  This might be the only option, so hoepfully
> there's something I can do.
> Or should I just push to install php5 if they let me?  Will php5 and
> postgresql work together inherently?  Or will I need to add modules to
> the initial php5 installation?
> Thanks for any help!
> Shad

I think either version can be made to work, but the problem you're going to
run into is that the vendor-supplied packages aren't compiled against
PostgreSQL 8.3.

They'd need to rebuild the PHP RPM and then install the PHP pgsql module
(for either version).

Or, they can install the vendor-supplied package, but you'd need the older
postgresql library that it was compiled against also on the system, through
a compatibility package or just hacked in manually (and appropriate
overrides provided to RPM when installing the PHP module).

--
Even a sixth-grader can figure out that you can’t borrow money to pay off
your debt

Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 4:33 PM, shadrack <shadkeene@hotmail.com> wrote:
> My basic question is...are php4 and postgresql 8.3 compatible?
> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,

You should be fine.  PostgreSQL 8.3 will answer most older pgsql
clients coming from the server just fine, so you don't have to compile
php by hand or anything to get it to talk to postgresql.  The real
issues to pop up will be compiling pgsql 8.3 on that old of a version
of RHEL.  I'm not saying you will have problems, just that if you do,
expect it to be there.

Re: php4 and postgresql 8.3

От
Tom Lane
Дата:
shadrack <shadkeene@hotmail.com> writes:
> My basic question is...are php4 and postgresql 8.3 compatible?
> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
> some of those versions are old...its government, and I unfortunately
> don't have control over the version.

Er ... Red Hat *what*?  I don't think they ever used such a version
number.  If they did it was a very long time ago (for calibration,
they were just about to release RHL 7.3 when I joined the company,
in 2001).  You could probably scare the powers-that-be into letting
you update the thing just on the grounds of it still being full of
Y2K bugs.

But more likely you read the wrong version number.  What does it say
in /etc/redhat-release ?

(As already noted, php4 versus PG 8.3 is the least of your worries.
I'm just wondering whether you are on an OS version that's stable
enough that you should consider going live with *anything*.)

            regards, tom lane

Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 6:29 PM, Shad Keene <shadkeene@hotmail.com> wrote:
> We already have the postgresql installed and its working fine but I can't
> communicate with it using php4 that's installed. I can't find the php-pgsql
> module or the pgsql.so in php.ini.  So I'm getting an error on pg_connect.
> Any suggestions on what to do from here?

sudo yum install php-pgsql*

maybe

sudo rpm --install php-pgsql.rpm

or whatever the file name is.  If you're that unfamiliar with Red Hat,
making you live with RHEL3 is not gonna help things.  I don't even
know if it has yum, so you get to have all the fun of rpm dependency
resolution solving by yourself.

Honestly, If I was on an OS that old I'd probably just compile
everything from source.

Re: php4 and postgresql 8.3

От
Shad Keene
Дата:
We already have the postgresql installed and its working fine but I can't communicate with it using php4 that's installed. I can't find the php-pgsql module or the pgsql.so in php.ini.  So I'm getting an error on pg_connect.  Any suggestions on what to do from here?
Can I simply download php-pgsql and the pgsql.so?  And if so, how do I find the version that works with php4 and postgres 8.3? 
Thanks,
Shad



> Date: Mon, 2 Mar 2009 17:42:28 -0700
> Subject: Re: [GENERAL] php4 and postgresql 8.3
> From: scott.marlowe@gmail.com
> To: shadkeene@hotmail.com
> CC: pgsql-general@postgresql.org
>
> On Mon, Mar 2, 2009 at 4:33 PM, shadrack <shadkeene@hotmail.com> wrote:
> > My basic question is...are php4 and postgresql 8.3 compatible?
> > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
>
> You should be fine. PostgreSQL 8.3 will answer most older pgsql
> clients coming from the server just fine, so you don't have to compile
> php by hand or anything to get it to talk to postgresql. The real
> issues to pop up will be compiling pgsql 8.3 on that old of a version
> of RHEL. I'm not saying you will have problems, just that if you do,
> expect it to be there.


Windows Live™: Life without walls. Check it out.

Re: php4 and postgresql 8.3

От
John R Pierce
Дата:
Tom Lane wrote:
> shadrack <shadkeene@hotmail.com> writes:
>
>> My basic question is...are php4 and postgresql 8.3 compatible?
>> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
>> some of those versions are old...its government, and I unfortunately
>> don't have control over the version.
>>
>
> Er ... Red Hat *what*?  I don't think they ever used such a version
> number.  If they did it was a very long time ago (for calibration,
> they were just about to release RHL 7.3 when I joined the company,
> in 2001).


well, remember, they went Red Hat Linux 7.x, 8.x, 9 then very quickly
switched to Red Hat Enterprise Linux 2, 2.1, 3, 4, and currently RHEL
5.   RHEL 3 has had several quarterly updates, most recent of which is
u9(I think), sometimes referred to as 3.9.

if its RHEL 3 update-something that shadrack is discussing, it came with
php 4.3.2 and rh-postgresql 7.3.21 (shudder!)



Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 6:35 PM, John R Pierce <pierce@hogranch.com> wrote:
> Tom Lane wrote:
>>
>> shadrack <shadkeene@hotmail.com> writes:
>>
>>>
>>> My basic question is...are php4 and postgresql 8.3 compatible?
>>> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
>>> some of those versions are old...its government, and I unfortunately
>>> don't have control over the version.
>>>
>>
>> Er ... Red Hat *what*?  I don't think they ever used such a version
>> number.  If they did it was a very long time ago (for calibration,
>> they were just about to release RHL 7.3 when I joined the company,
>> in 2001).
>
>
> well, remember, they went Red Hat Linux 7.x, 8.x, 9 then very quickly
> switched to Red Hat Enterprise Linux 2, 2.1, 3, 4, and currently RHEL 5.
> RHEL 3 has had several quarterly updates, most recent of which is u9(I
> think), sometimes referred to as 3.9.
>
> if its RHEL 3 update-something that shadrack is discussing, it came with php
> 4.3.2 and rh-postgresql 7.3.21 (shudder!)

I wonder if the people making this decision are familiar with this
document at redhat:

https://www.redhat.com/security/updates/errata/

Which pretty much says that RHEL3 is on its last legs, will get only
security updates, and may get individual bug fixes if they're really
severe.

So, when some PHP bug means you can't do something you need to do in
production, you get no help from RedHat.  They've got other customers
to worry about.

Once RHEL is in the third of three phases of release, it's intended to
be maintained, not used for fresh new projects etc...

Somebody's conservatism is gonna cost the OP a LOT of time and effort.

Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 4:33 PM, shadrack <shadkeene@hotmail.com> wrote:
> My basic question is...are php4 and postgresql 8.3 compatible?
> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,

You do know that php4 is discontinued, right?  No more bug fixes, no
more security fixes.  I hope you're having to install something really
really old that needs no maintenance.  If you're expected to develop
on this, do the right thing and quit now.

Re: php4 and postgresql 8.3

От
John R Pierce
Дата:
Shad Keene wrote:
> We already have the postgresql installed and its working fine but I
> can't communicate with it using php4 that's installed. I can't find
> the php-pgsql module or the pgsql.so in php.ini.  So I'm getting an
> error on pg_connect.  Any suggestions on what to do from here?
> Can I simply download php-pgsql and the pgsql.so?  And if so, how do I
> find the version that works with php4 and postgres 8.3?

you can't simply jam in a different php-pgsql module, as PHP is built as
an integrated package with Apache and any modules and client libraries.

assuming this system is in fact Red Hat Enterprise Linux 3, and is still
on Red Hat Network support contract,

    up2date -U php-pgsql

(or maybe its -u, I forget) should take care of the php part.   this
will, however, try and load the RHEL 3.x libpq.so, which was built for
rh_postgresql 7.3.3, a very very ancient version of postgresql, and its
very unclear if this will interoperate correctly with Postgres 8.3.  At
one time, a member of the postgres development group was building a RPM
compat-postgresql-libs  for RHEL3 which would work here, however, they
no longer support RHEL3 as it won't work within their Xen based build
cluster.





Re: php4 and postgresql 8.3

От
John R Pierce
Дата:
Scott Marlowe wrote:
> On Mon, Mar 2, 2009 at 8:44 PM, John R Pierce <pierce@hogranch.com> wrote:
>
>> (or maybe its -u, I forget) should take care of the php part.   this will,
>> however, try and load the RHEL 3.x libpq.so, which was built for
>> rh_postgresql 7.3.3, a very very ancient version of postgresql, and its very
>> unclear if this will interoperate correctly with Postgres 8.3.  At one time,
>>
>
> It will.  pg 8.x can talk as far back as something like 6.3.  6.2 was
> abandoned a couple years back I believe.
>

so, then the question becomes one of whether or not the
rh-postgresql-libs RPM will conflict with whatever customer 8.3 build
shad k. is using...   hopefully, the 8.3 build has its libraries in a
private location like /opt/pgsql83/lib or /usr/local/pgsql/lib rather
than the RH default location of /usr/lib ...    the php-pgsql module is
likely going to load the /usr/lib/libpq.so 7.3 library and try to
connect with the 8.3 server.





Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 8:44 PM, John R Pierce <pierce@hogranch.com> wrote:
> (or maybe its -u, I forget) should take care of the php part.   this will,
> however, try and load the RHEL 3.x libpq.so, which was built for
> rh_postgresql 7.3.3, a very very ancient version of postgresql, and its very
> unclear if this will interoperate correctly with Postgres 8.3.  At one time,

It will.  pg 8.x can talk as far back as something like 6.3.  6.2 was
abandoned a couple years back I believe.

Re: php4 and postgresql 8.3

От
shadrack
Дата:
On Mar 2, 5:35 pm, pie...@hogranch.com (John R Pierce) wrote:
> Tom Lane wrote:
> > shadrack <shadke...@hotmail.com> writes:
>
> >> My basic question is...are php4 and postgresql 8.3 compatible?
> >> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
> >> some of those versions are old...its government, and I unfortunately
> >> don't have control over the version.
>
> > Er ... Red Hat *what*?  I don't think they ever used such a version
> > number.  If they did it was a very long time ago (for calibration,
> > they were just about to release RHL 7.3 when I joined the company,
> > in 2001).  
>
> well, remember, they went Red Hat Linux 7.x, 8.x, 9 then very quickly
> switched to Red Hat Enterprise Linux 2, 2.1, 3, 4, and currently RHEL
> 5.   RHEL 3 has had several quarterly updates, most recent of which is
> u9(I think), sometimes referred to as 3.9.
>
> if its RHEL 3 update-something that shadrack is discussing, it came with
> php 4.3.2 and rh-postgresql 7.3.21 (shudder!)
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

Yes, we had postgresql 7.3 but I installed postgresql 8.3 onto the
rhel3.  Do you think its going to work?  What's the solution that
involves the least work, considering I'm not the one maintaining these
machines?  Do you think it would be simple for the IT person to update
to rhel5 and php5?  Its basically just one machine that he would have
to update.  Thoughts?  Thanks so much for all the feedback.
shad

Re: php4 and postgresql 8.3

От
Scott Marlowe
Дата:
On Mon, Mar 2, 2009 at 8:24 PM, shadrack <shadkeene@hotmail.com> wrote:
> On Mar 2, 5:35 pm, pie...@hogranch.com (John R Pierce) wrote:
>> Tom Lane wrote:
>> > shadrack <shadke...@hotmail.com> writes:
>>
>> >> My basic question is...are php4 and postgresql 8.3 compatible?
>> >> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
>> >> some of those versions are old...its government, and I unfortunately
>> >> don't have control over the version.
>>
>> > Er ... Red Hat *what*?  I don't think they ever used such a version
>> > number.  If they did it was a very long time ago (for calibration,
>> > they were just about to release RHL 7.3 when I joined the company,
>> > in 2001).
>>
>> well, remember, they went Red Hat Linux 7.x, 8.x, 9 then very quickly
>> switched to Red Hat Enterprise Linux 2, 2.1, 3, 4, and currently RHEL
>> 5.   RHEL 3 has had several quarterly updates, most recent of which is
>> u9(I think), sometimes referred to as 3.9.
>>
>> if its RHEL 3 update-something that shadrack is discussing, it came with
>> php 4.3.2 and rh-postgresql 7.3.21 (shudder!)
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
>> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general
>
> Yes, we had postgresql 7.3 but I installed postgresql 8.3 onto the
> rhel3.  Do you think its going to work?  What's the solution that
> involves the least work, considering I'm not the one maintaining these
> machines?  Do you think it would be simple for the IT person to update
> to rhel5 and php5?  Its basically just one machine that he would have
> to update.  Thoughts?  Thanks so much for all the feedback.
> shad

Going straight to RHEL 5 would be a way smarter move.  it's stable,
it's supported, and it has php5 and pgsql 8.something as a default
(8.2?  Somewhere in there).  Plus,. if you want 8.3 you just don't
install 8.2 and instead grab the PGDG rpms from the postgresql ftp
site.  I could maybe understand a corporate policy of supporting
RHEL4, but RHEL3 is ancient.

Re: php4 and postgresql 8.3

От
Marco Colombo
Дата:
Tom Lane wrote:
> shadrack <shadkeene@hotmail.com> writes:
>> My basic question is...are php4 and postgresql 8.3 compatible?
>> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know,
>> some of those versions are old...its government, and I unfortunately
>> don't have control over the version.
>
> Er ... Red Hat *what*?  I don't think they ever used such a version
> number.  If they did it was a very long time ago (for calibration,
> they were just about to release RHL 7.3 when I joined the company,
> in 2001).  You could probably scare the powers-that-be into letting
> you update the thing just on the grounds of it still being full of
> Y2K bugs.

Well, the first Red Hat Linux I'm used was 4.1 (I still remember the
code name, Vanderbilt). And it was '97 I think. So if you're *really*
thinking of RHL 3 something, wikipedia says about early RH revision
history:

# 1.0 (Mother's Day), November 3, 1994 (Linux 1.2.8)
# 1.1 (Mother's Day+0.1), August 1, 1995 (Linux 1.2.11)
# 2.0, September 20, 1995 (Linux 1.2.13-2)
# 2.1, November 23, 1995 (Linux 1.2.13)
# 3.0.3 (Picasso), May 1, 1996 - first release supporting DEC Alpha
# 4.0 (Colgate), October 3, 1996 (Linux 2.0.18) - first release supporting SPARC
# 4.1 (Vanderbilt), February 3, 1997 (Linux 2.0.27)

which reminds me, I've used Colgate a bit too. Back in those years I've used
also Postres95 (but on Slackware I suspect). Anyway, if I'm not mistaken,
the birth of PostgreSQL proper (6.0 I think) was at that time, '96.

The OP must refer to RHEL 3 something, it can't be RHL 3. He'd have a
tyrannosaur in his backyard and he's crying for help because he's got
a broken leg. We go "send pictures!". Quite seriously I'd really like
to see a picture of a running RHL 3 still in production. Maybe even
at RH won't mind one. Too bad uptime wouldn't show more than 497 days...

.TM.