Re: [DB] connection to database
| From: | Martin Marques | Date: | Thu, 11 Sep 2003 21:59:08 +0000 |
| Subject: | Re: [DB] connection to database | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7751@lists.php.net to get a copy of this message | ||
Looks like he doesn't have TCP/IP connections enabled in PostgreSQL.
Edit postgresql.conf and put
tcpip_socket = true
reload postgresql and ready to go!
El Jue 11 Sep 2003 14:00, Rob Hutton escribió:
> did you try 127.0.0.1? Or the external IP address of the web server (I
> hope this one does not work)...
>
> > -----Original Message-----
> > From: phpCoder [mailto:spambox@wanadoo.fr]
> > Sent: Thursday, September 11, 2003 12:59 PM
> > To: pear-general@lists.php.net
> > Subject: Re: [PEAR] [DB] connection to database
> >
> >
> > On my local web server, localhost works fine too but with my provider
> > here is the error message :
> >
> > Warning: pg_connect(): Unable to connect to PostgreSQL server: could not
> > connect to server: Connection refused Is the server running on host
> > localhost and accepting TCP/IP connections on port 5432?
> >
> >
> >
> >
> > "Stephen March" <steve@enerds.ca> a écrit dans le message de news:
> > 3F60A7D4.4030909@enerds.ca...
> >
> > > localhost works just fine for my windows & linux servers
> > >
> > > ~Steve
> > >
> > > phpCoder wrote:
> > > >I've seen on pear website that there is few possibility to connect to
> > > > a database using the $dsn variable.
> > > >I would like to know if it's possible to use DB while I can't
> >
> > specify the
> >
> > > >Hostname.
> > > >Why ? because my provider don't allow me that thing. The database is
> >
> > hosted
> >
> > > >on localhost but if i specify Localhost
> > > >the connection is impossible.
> > > >
> > > >When I use phpPGadmin in the header i can see : "hosted on
> > :
> > :5432" whereas
> >
> > we
> >
> > > >usually see "hosted on hostname:5432"
> > > >
> > > >SO, is it possible and how ?
> > > >
> > > >Thanks
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
--
18:57:01 up 20 days, 10:47, 7 users, load average: 0.23, 0.19, 0.10
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------