Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 38E54476571 for ; Mon, 9 Sep 2002 11:16:45 -0400 (EDT) Received: from mx03.gis.net (mx03.gis.net [208.218.130.11]) by postgresql.org (Postfix) with ESMTP id D20FB476514 for ; Mon, 9 Sep 2002 10:51:44 -0400 (EDT) Received: from shell.gis.net ([208.218.129.18]) by mx03.gis.net; Mon, 09 Sep 2002 10:51:20 -0400 Date: Mon, 9 Sep 2002 10:46:46 -0400 (EDT) From: Chadwick Rolfs To: arun kv Cc: PGSQL Subject: Re: Error"Unable to connect to PostgresSQL server: connectDBStart()" In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/23 X-Sequence-Number: 1478 How about checking that localhost is defined in /etc/hosts here's mine: 127.0.0.1 ssbeagle localhost it also may be that pg_hba.conf doesn't have a localhost entry. Could you post the pertinent lines of /var/www/html/phpfile/other/orthersbrowse.php? If it's not too big, post it all. Then maybe you could let us know what pg_hba.conf accepts for local connections see: http://postgresql.crimelabs.net/users-lounge/docs/7.1/postgres/client-authentication.html Another option, if this is all local (it looks like it is) is to take out the hostname part of the pg_connect("") string. Username database, and maybe even password (if you set it up) may be all you need anyway. Hope this helps! On Mon, 9 Sep 2002, arun kv wrote: > hello, > I am using PHP to connect to postgresql server. Till now it was > working fine and PHP was connecting sql server without any problems. > Suddenly today i am getting an error or warning which says > 'Warning: > Unable to connect to PostgresSQL server: connectDBStart() -- unknown > hostname: localhost in /var/www/html/phpfiles/others/othersbrowse.php on > line 20 > Warning: Supplied argument is not a valid PostgreSQL link > resource in /var/www/html/phpfiles/others/othersbrowse.php on line 25 > ERROR IN > EXECUTION' > > > I am not getting what the problem was. Beform some times it used to come > but when i restarted the system it used to work fine. > Pls anybody tell me what the problem is and any suggestions pls since the > server has to run all the 24 hours and 365 days. > thanks in advance > Arun > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -Chadwick