X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BD1119FB215 for ; Sun, 13 Aug 2006 16:33:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 71561-03 for ; Sun, 13 Aug 2006 16:32:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sydney.mailnetwork.co.uk (server88-208-192-113.live-servers.net [88.208.192.113]) by postgresql.org (Postfix) with ESMTP id B06C69FA30A for ; Sun, 13 Aug 2006 16:32:47 -0300 (ADT) Received: from andyshellam-gw.adsl.newnet.co.uk ([80.175.198.137]:57905 helo=[192.168.1.15]) by sydney.mailnetwork.co.uk with esmtpa (Exim 4.60) (envelope-from ) id 1GCLhV-0004xJ-In; Sun, 13 Aug 2006 20:32:45 +0100 Message-ID: <44DF7E5B.6070807@mailnetwork.co.uk> Date: Sun, 13 Aug 2006 20:32:43 +0100 From: Andy Shellam Reply-To: Andy Shellam Organization: The Mail Network User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Fatih Gulec CC: pgsql-php@postgresql.org Subject: Re: DB Error: connect failed References: <2033.193.140.224.60.1155482848.squirrel@cs.hacettepe.edu.tr> In-Reply-To: <2033.193.140.224.60.1155482848.squirrel@cs.hacettepe.edu.tr> 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=2.184 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: ** X-Archive-Number: 200608/15 X-Sequence-Number: 3586 Faith, I'm guessing one of 2 things is happening here: - PHP is connecting through the Unix socket in /tmp, and permissions are wrong on the /tmp directory for the Apache user - Something like TCP wrappers is blocking localhost connections Try changing the connection host to the machine's ethernet IP address instead of 127.0.0.1, this will give you a clue if this is the case. You could also examine the PostgreSQL logs - I doubt if it would log this error, but it's worth a shot. Andy. Fatih Gulec wrote: > Here is the problem : > System : Fedora Core 5 > Application server : Apache (comes with Fedora base installation) > > 1. I could not connect to postgresql in php code whicih uses pear packet > DB. Here is the error code : > DB Error: connect failed [nativecode=Unable to connect to PostgreSQL > server: could not connect to server: Permission denied Is the server > running on host "127.0.0.1" and accepting TCP/IP connections on port > 5432?] ** pgsql://postgres:bbmprens@127.0.0.1/prens > > 2. By the way I can connect that db from an other machine which the system > is Windows XP and program is default PgAdmin. > 2. Alsa I can connect and use from a windows machine with the sama php > code that connects to the dbms which works on the Fedora Core 5. > 3. The user and password are tested by using pgsql command, in command > prompt. > > Thanks... > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: 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 > > !DSPAM:37,44df4bd2143293352620759! > > >