Re: Problem with pgsql-cygwin

From: s0lao(at)netscape(dot)net (S(dot) L(dot))
To: Jason(dot)Tishler(at)dothill(dot)com
Cc: geoaguila(at)cimer(dot)net, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Problem with pgsql-cygwin
Date: 2001-06-19 05:56:34
Message-ID: 39930103.0D0B8A31.00013D13@netscape.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin


Jason Tishler <Jason(dot)Tishler(at)dothill(dot)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. without having either pg_connect("localhost",[...]) or pg_connect("host=$hostname [...]") ) will fail. Yes, because when internet sockets 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 -- whether it's a win32 build or a cygwin (in this last case the "c:\apache\website\html\varios\webtasker\php\postgres.php" being an 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(dot)Tishler(at)dothill(dot)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/

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message S. L. 2001-06-19 10:33:52 Re: Cygwin PostgreSQL with TCL support (was Re: hi)
Previous Message Bruce Momjian 2001-06-18 21:38:19 Re: [PATCHES] Cygwin contrib patch