Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EBE6A47603C for ; Mon, 9 Sep 2002 12:02:15 -0400 (EDT) Received: from enterprise.centliq.com (adsl-65-71-224-185.dsl.rcsntx.swbell.net [65.71.224.185]) by postgresql.org (Postfix) with ESMTP id 0373147651B for ; Mon, 9 Sep 2002 11:50:58 -0400 (EDT) Received: from centennialwines.com (unknown [192.168.1.2]) by enterprise.centliq.com (Postfix) with ESMTP id 853EFFF00B; Mon, 9 Sep 2002 09:47:16 -0500 (CDT) Message-ID: <3D7CC244.7000303@centennialwines.com> Date: Mon, 09 Sep 2002 10:46:12 -0500 From: "David C. Brown" User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: arun kv Cc: PGSQL Subject: Re: Error"Unable to connect to PostgresSQL server: connectDBStart()" References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/24 X-Sequence-Number: 1479 It says it cannot resolve "localhost" Do you have it defined in your /etc/hosts file (or c:\windows\hosts)? Once it fails to resolve localhost it cannot create a connection to the database which in turn is the next operation on that connection (that you didn't create) fails with the second error message. Dave 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 6: Have you searched our list archives? > >http://archives.postgresql.org > > >