Re: [GENERAL] interesting PHP/MySQL thread

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: "Reuben D(dot) Budiardja" <techlist(at)voyager(dot)phys(dot)utk(dot)edu>
Cc: "Advocacy (PostgreSQL)" <pgsql-advocacy(at)postgresql(dot)org>, PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] interesting PHP/MySQL thread
Date: 2003-06-23 16:55:09
Message-ID: Pine.LNX.4.33.0306231052050.23895-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-docs pgsql-general

On Mon, 23 Jun 2003, Reuben D. Budiardja wrote:

> On Sunday 22 June 2003 11:22 pm, Alvaro Herrera wrote:
> > On Sun, Jun 22, 2003 at 10:19:20PM -0400, Tom Lane wrote:
> > > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > > Interesting thread (php-dev subj: removing bundled libmysql):
> > > > http://marc.theaimsgroup.com/?l=php-dev&m=105621066832429&w=2
> >
> > Note the comment on
> > http://marc.theaimsgroup.com/?l=php-dev&m=105624024116515&w=2 :
> >
> > Georg Richter wrote:
> > > Unbelievable.
> > > Guess the postgres guys are licking their chops over this.
> > >
> > > > We need to use this opportunity to encourage PHP folks to switch to
> > > > PostgreSQL.
> > >
> > > Indeed. What can we do exactly?
> >
> > Probably the Postgres client library (that'd be libpq) can be included
> > as part of the PHP distribution. With that, according to the thread,
> > the Postgres support could be built in by default. I can't find the PHP
> > license on their website though.
>
> I don't quite understand this. I thought PostgreSQL library _is_ included with
> PHP distribution. All I needed to do to compile is put --with-pgsql in
> configuring php.

With PHP, when you type --with-pgsql it looks for the libs that postgresql
installed for connection. With the way MySQL support was installed, the
connection lib files were actually in the PHP source tree, and it by
default didn't use the ones installed by MySQL.

Note that this could actually cause issues if you compiled Apache with the
right setup to support mysql database authentication and it used the
installed mysql libs and php used its built in libs and they were
different versions you'd have a version of apache / PHP that would crash
randomly.

For this reason and many others, it is considered a bad design decision to
have included the connect libs in the PHP's source tree. It basically
made it easier for junior sys admins to shoot themselves in the foot.
:-)

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Sterling Hughes 2003-06-23 16:56:46 Re: [GENERAL] interesting PHP/MySQL thread
Previous Message scott.marlowe 2003-06-23 16:47:30 Re: [GENERAL] interesting PHP/MySQL thread

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2003-06-23 16:58:32 Re: Updated Russian version of FAQ
Previous Message Bruce Momjian 2003-06-23 16:41:55 Re: [GENERAL] interesting PHP/MySQL thread

Browse pgsql-general by date

  From Date Subject
Next Message Sterling Hughes 2003-06-23 16:56:46 Re: [GENERAL] interesting PHP/MySQL thread
Previous Message Jason Underdown 2003-06-23 16:51:22 Re: Unable to create or drop plpgsql