Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BD57D634831 for ; Thu, 10 Sep 2009 19:51:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10037-03 for ; Thu, 10 Sep 2009 22:51:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f191.google.com (mail-pz0-f191.google.com [209.85.222.191]) by mail.postgresql.org (Postfix) with ESMTP id 84916634006 for ; Thu, 10 Sep 2009 19:51:25 -0300 (ADT) Received: by pzk29 with SMTP id 29so436212pzk.14 for ; Thu, 10 Sep 2009 15:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=NarpWNsaTS3Glqz7ecIYb1TmsGwLI8qz0H8HlJJ9nrE=; b=Y3r9Y55ldlvMswMkPK1Nyo1DldSGSkeK1TeTHXv5+ThIWAILdmAET9lByDS+pXTOwh k5muG8kUYM2yGGe+gNesWWepMfVOX6DHwYZq+9UDX25Ey3Bn/JEBZ7rda78U4/5Er0wr b/bQXvUmmy3d+6jFMLu2LEk4cfkmL4d4/G7zM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XTNsRIXo03YjShpCFYWdkpb1MliIyN0B1lTSjpzX1UxocqsxHaXhzSlCj4cBgcbWmo O5M4v3A4Xl5OjRJy7XhSSWbLOsRQZwkRDXTrA98YA4/uwmcG7PkYRO6Yo3wEd23siYSy bnGOfhuRL3OtFETHLfNUJRUYl/1UQ4on9pm4s= Received: by 10.115.86.19 with SMTP id o19mr3930440wal.9.1252623083602; Thu, 10 Sep 2009 15:51:23 -0700 (PDT) Received: from ?192.168.2.65? (office.squiz.net [203.206.128.174]) by mx.google.com with ESMTPS id 21sm793901pzk.7.2009.09.10.15.51.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Sep 2009 15:51:22 -0700 (PDT) Message-ID: <4AA982E2.1050807@gmail.com> Date: Fri, 11 Sep 2009 08:51:14 +1000 From: Chris User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Arun Oakley CC: pgsql-php@postgresql.org Subject: Re: pg_connect() error References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.644 tagged_above=-10 required=5 tests=BAYES_00=-2.599, URIBL_BLACK=1.955 X-Spam-Level: X-Archive-Number: 200909/14 X-Sequence-Number: 4072 Arun Oakley wrote: > hi guys, > > we have a postgres db with a hosting company and have been trying to > connect to. error is below. > *Warning*: pg_connect() [function.pg-connect > ]: Unable to connect to > PostgreSQL server: could not connect to server: Connection refused Is > the server running on host "pgdb1.host-ed.net > " and accepting TCP/IP connections on port 3306? Port 3306 is usually mysql not postgres. Postgres (by default) uses 5432. > from my trawling around google i have found that it could be related to > the postgres.conf file and turning on tcpip sockets to true?? (i cannot > view/edit any postgres conf files) > oh and those are the host/port details supplied by hosting provider > > > any help would be appreciated in pointing on the right path. Make sure they know you want a postgres db, not mysql. Apart from that, if you can't view a postgres.conf file let alone change it, you need to raise a support issue with them to fix it. Do they allow remote connections to their database? Maybe they don't for security reasons. -- Postgresql & php tutorials http://www.designmagick.com/