pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Christian Imbeault <jc@mega-bucks.co.jp>
To: christoph.dellavalle@goetheanum.ch, pgsql-novice <pgsql-novice@postgresql.org>
Subject: Re: Accessing Postgres db from apache using PHP
Date: Mon, 28 Jul 2003 16:20:59 +0900
Message-ID: <3F24CEDB.6040300@mega-bucks.co.jp> (raw)
References: <D1ECCF616FF6D611A3C3000102755F45138BF2@S2BDCMAIL>

>i then do a:
>	$tmp = "host=localhost dbname=gforge user=gforge 
>password=gforge";
>	$conn = @pg_connect($tmp);


Just jumping in here but don't you need to specify the port?

$conn = pg_connect("host=localhost port=5432 dbname=gforge user=gforge");

Also, don't use the @, that way you can see any useful error messages
that are displayed :)

Oh, and you did change the conf file to let postgres use TCP/IP?

tcpip_socket = true
port=5432

Jc





view thread (13+ messages)  latest in thread

Message-ID: <3F24CEDB.6040300@mega-bucks.co.jp>
Permalink:  ../3F24CEDB.6040300@mega-bucks.co.jp/
Also on:    postgresql.org/message-id/3F24CEDB.6040300@mega-bucks.co.jp

 · 

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: jc@mega-bucks.co.jp, pgsql-novice@postgresql.org
  Subject: Re: Accessing Postgres db from apache using PHP
  In-Reply-To: <3F24CEDB.6040300@mega-bucks.co.jp>
  References: <D1ECCF616FF6D611A3C3000102755F45138BF2@S2BDCMAIL> <3F24CEDB.6040300@mega-bucks.co.jp>

* 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