Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3D71E633828 for ; Sun, 31 Jan 2010 18:22:11 -0400 (AST) 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 00499-04 for ; Sun, 31 Jan 2010 22:22:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by mail.postgresql.org (Postfix) with ESMTP id 9744D632E94 for ; Sun, 31 Jan 2010 18:22:00 -0400 (AST) Received: by pxi32 with SMTP id 32so3256703pxi.15 for ; Sun, 31 Jan 2010 14:21:59 -0800 (PST) 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=iw0ME5XykADuTlwqOGvDBwKeWUzdIshbFxyi7XjpHhs=; b=TJb/yq7JhyYKOzP5/d1q4xAtBrPC3W/bThgQSLKsX0H1K/RMYVHwsfdx0y8uFXc6EC kepVTEAU2rXs7aYS9iMLkt99BPquCDBSqo/74MQsivtltRVJ/okMLMQZyR6tB0y/cJls FwAg665xPdbr54aRJQAHh5jIQuyL+iI9MzS0I= 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=kqNhEBE9BBB/JyGRJ0bAmnIDbZQLLi2BBUxN8kWwFF7WSmDvY9waPg8nIdhCkuuaPQ iZIE83uQegNC3jO5nsZ04SUNjJFJSKNsCIaLYBe/a6SBiFzVcRhFxIOmfJgRGsy8rcph TXHwoG3vmmXA84BWTpmWqFgeSLdGbBJnBvw+c= Received: by 10.115.84.18 with SMTP id m18mr2566339wal.70.1264976518698; Sun, 31 Jan 2010 14:21:58 -0800 (PST) Received: from ?192.168.2.65? (office.squiz.net [203.206.128.174]) by mx.google.com with ESMTPS id 23sm3932612pzk.8.2010.01.31.14.21.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 31 Jan 2010 14:21:57 -0800 (PST) Message-ID: <4B660281.5060007@gmail.com> Date: Mon, 01 Feb 2010 09:21:53 +1100 From: Chris User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Gustavo Amarilla Santacruz CC: Bill Moran , pgsql-php@postgresql.org Subject: Re: Undefined function pg_connect() References: <4B60DC23.9020404@gmail.com> <20100128084415.4d98823a.wmoran@potentialtech.com> <4B62236F.1090200@gmail.com> 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=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/22 X-Sequence-Number: 4120 > ; Directory in which the loadable extensions (modules) reside. > ; http://www.php.net/manual/en/ini.core.php#ini.extension-dir > ; extension_dir = "./" > ;extension_dir = "./;/usr/lib/php/modules/;/usr/lib/pgsql/" These should be colon separated, not semicolon - notice it's trying to load both paths included: PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/curl.so' Change it to extension_dir = "./:/usr/lib/php/modules/:/usr/lib/pgsql/" > Then, a new message was displayed: > > "Warning: pg_connect(): Unable to connect to PostgreSQL server: could > not connect to server: Permission denied Is the server running on host > "localhost" and accepting TCP/IP connections on port 5432? could not > connect to server: Permission denied Is the server running on host > "localhost" and accepting TCP/IP connections on port 5432?" "Permission denied" sounds like either file permissions or seLinux is stopping the connection. If you have seLinux enabled, try disabling it (don't know how to do that, sorry) - at least that will tell you if that's the problem. For file permissions, check your apache user can read where-ever the postgres socket file is put (normally /tmp/.s.PGSQL.5432 on centos/rhel). -- Postgresql & php tutorials http://www.designmagick.com/