pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: pgsql-php@postgresql.org
Cc: LonLinux <longlinux@gmail.com>
Subject: Re: pg_connect error
Date: Sun, 18 May 2008 21:40:10 -0400
Message-ID: <200805182140.10890.xzilla@users.sourceforge.net> (raw)
In-Reply-To: <001201c8b924$bad26150$e295fea9@osvaldox>
References: <001201c8b924$bad26150$e295fea9@osvaldox>

On Sunday 18 May 2008 16:21:15 LonLinux wrote:
> Hello, I have this problem with a connection to postgres server (running in
> a win2000 server). When I connect with pgAdmin to the same postgres server
> works ok, but when I try to connect from php5 the connection fails. Can
> help me?
> Thanks.
>
> $db_conn = pg_connect("host=SQLMACHINE port=5432 password=xxxx
> user=postgres dbname=compraventa1"); if (!$db_conn): ?>
>     <H1>Failed connecting to postgres database <? echo "compraventa1"
> ?></H1> <? exit;
> endif;
>

Well, what's the error message? (And if there isnt one, have you looked in the 
db logs? If nothing there, try connecting with psql with the same credentials 
as above, as your web servers user)

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL



view thread (8+ messages)  latest in thread

Message-ID: <200805182140.10890.xzilla@users.sourceforge.net>
Permalink:  ../200805182140.10890.xzilla@users.sourceforge.net/
Also on:    postgresql.org/message-id/200805182140.10890.xzilla@users.sourceforge.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: xzilla@users.sourceforge.net, longlinux@gmail.com
  Subject: Re: pg_connect error
  In-Reply-To: <200805182140.10890.xzilla@users.sourceforge.net>
  References: <001201c8b924$bad26150$e295fea9@osvaldox> <200805182140.10890.xzilla@users.sourceforge.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox