Re: Problem with pgsql-cygwin - Mailing list pgsql-cygwin

From s0lao@netscape.net (S. L.)
Subject Re: Problem with pgsql-cygwin
Date
Msg-id 39930103.0D0B8A31.00013D13@netscape.net
Whole thread Raw
In response to Re: Problem with pgsql-cygwin  (Jason Tishler <Jason.Tishler@dothill.com>)
List pgsql-cygwin
Jason Tishler <Jason.Tishler@dothill.com> wrote:
>
> On Fri, Jun 15, 2001 at 05:22:06PM -0600, Jorge Aguilar wrote:
> > Within the bash session everything is ok., but if try to connect using
> > apache+PHP, the next message appears:
> >
> > Warning: Unable to connect to PostgreSQL server: connectDBStart() --
> > connect() failed: No error Is the postmaster running (with -i) at
> > 'localhost' and accepting connections on TCP/IP port '5432'? in
> > c:\apache\website\html\varios\webtasker\php\postgres.php on line 13
> >
> > could you please help me, again?
>

This is a common problem under win32 Apache/PHP & PostgreSQL. A pg_connect statement without host field completed (i.e.
withouthaving either pg_connect("localhost",[...]) or pg_connect("host=$hostname [...]") ) will fail. Yes, because when
internetsockets are not forced like the above, the switch back to unix sockets doesn't work on win32. 

And there could be some much common mistakes like a misspell or such. It also depends on your version of Apache/PHP --
whetherit's a win32 build or a cygwin (in this last case the "c:\apache\website\html\varios\webtasker\php\postgres.php"
beingan abuse -- cygwin doesn't call it's paths/files like this :) 


> Please keep the thread on the mail list so others can benefit too.  And,
> in this case, you will benefit too since I do not have any PHP experience.
>
> The only (very limited) help that I can offer is the following standard
> PostgreSQL suggestions:
>
>     1. Is postmaster running with the -i option?
>     2. Is the pg_hba.conf set up correctly?
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone: 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:   732.264.8798
> 82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


                           SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

pgsql-cygwin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Cygwin contrib patch
Next
From: s0lao@netscape.net (S. L.)
Date:
Subject: Re: Cygwin PostgreSQL with TCL support (was Re: hi)