Re: Re: RPMs for PHP accessing PostgreSQL via ODBC over RedHat - Mailing list pgsql-general

From Paulo Parola
Subject Re: Re: RPMs for PHP accessing PostgreSQL via ODBC over RedHat
Date
Msg-id 002001c0a5ee$f9b8a100$170aa8c0@gst.com.br
Whole thread Raw
In response to Re: RPMs for PHP accessing PostgreSQL via ODBC over RedHat  (Chris <csmith@squiz.net>)
List pgsql-general
The case is really code compatibility. I have benn using PHP to access mSQL,
MySQL and PostgreSQL natively for quite a while, *but* we need to port an
apllication currently running on NT written in PHP and accessing MS Access
using ODBC. We have already exported the database to PostgreSQL over RedHat
Linux and have even configured phpPgAdmin for administering it through the
Web. The thing is we want to keep our code using PHP ODBC functions to
access the database and not use the native calls.

I know I can build PHP from the source specifying options such
as --with-unixodbc or --with-iodbc, *but* I am currently on an install where
I only used RPMs to configure everything and was wondering how I could do
that without having to build everything from tarballs (./configure, make,
make install...) and keep RedHat RPM package facilities and perhaps enable
PHP to comunicate to PostgreSQL through ODBC just by installing some RPM (I
also won't have the need to have the database and the application at
different servers - they are actually residing at the same machine).

Any hints?

TIA,
Paulo


----- Original Message -----
From: Chris <csmith@squiz.net>
To: <pgsql-general@postgresql.org>
Sent: Monday, March 05, 2001 8:02 PM
Subject: Re: [GENERAL] Re: RPMs for PHP accessing PostgreSQL via ODBC over
RedHat


>
> > > >Is it really necessary to use PHP and ODBC? PHP has a native
postgresql
> > > >interface I believe...
> > >
> > > It sounds like the postgres server is a different machine to the web
> > > server, so ODBC is needed to communicate between the 2..
> >
> >No it isn't.  Postgres should be accessible via PHP whether it's on the
> >same server or on a remote server (and Postgres is configured to allow
> >remote access).  The only reason I can guess as to why ODBC is being used
> >is to perhaps maintain code compatibility with the use of a different
> >databse platform that the web server may have been using previously.
> >
> >-- Brett
>
> I've never tried so had no idea :)
>
> How do you configure it into PHP?
>
> ./configure --help | grep pgsql
>    --with-pgsql[=DIR]      Include PostgreSQL support.  DIR is the
PostgreSQL
>                            base install directory, defaults to
> /usr/local/pgsql.
>
> ------------------------
> Chris Smith
> http://www.squiz.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


pgsql-general by date:

Previous
From: Bell John
Date:
Subject: Problem re Set Like Structures
Next
From: "Gregory Wood"
Date:
Subject: Re: MySQLs Describe emulator!