Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CBE336325E1 for ; Thu, 27 May 2010 19:51:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44871-05 for ; Thu, 27 May 2010 22:51:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 181ED63233E for ; Thu, 27 May 2010 19:51:03 -0300 (ADT) Received: by pxi18 with SMTP id 18so250991pxi.19 for ; Thu, 27 May 2010 15:51:02 -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:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=KaAgob4J8ZKLtHoqOA2jOp/lv7E9LqdemqVWybaFkOE=; b=X8nqing02auosXc2Kx1dJjSpxl5hTQV+NPy33KRfnsVoTE+i7tpqIzKhZcK1cl0nFY B6dyGLOSCp2IetgnZdaE8QI/OVNNMFIYnGbSNXT3ibMCd53XgXd8MJQ03jqwO/TfeQR4 TVC7urQczvgga6aUX8C+32boPHKclocXFy1gI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=dLIMsN94MFIxh+3n27jhyxI0nZ0Bv/O195AxyTLEJ8SV0x9EbRjGBoAMk2X7i0NPRa eBFfj0XydNMyqgm9AHe8+gGBlez1dKVsmL1Z0RTvvENgkgupIa0nX/d38FPvUG9VED0o PgS8u9/tX6A16HMgsRlzxYofhTltmXOFQXvUY= Received: by 10.141.214.35 with SMTP id r35mr2344315rvq.264.1275000662162; Thu, 27 May 2010 15:51:02 -0700 (PDT) Received: from [192.168.2.65] (ppp234-39.static.internode.on.net [59.167.234.39]) by mx.google.com with ESMTPS id l29sm1477431rvb.16.2010.05.27.15.50.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 May 2010 15:51:00 -0700 (PDT) Message-ID: <4BFEF74F.6080101@gmail.com> Date: Fri, 28 May 2010 08:50:55 +1000 From: Chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Re: Fatal error: Call to undefined function pg_connect() 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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/2 X-Sequence-Number: 4138 On 28/05/10 05:30, Steve.Toutant@inspq.qc.ca wrote: > > Hi, > I created a php page and the code connects to my postgres database and > do stuff... > that works well when launched from a browser > > But it doesn't from a command line > PHP myFile.php > > I get this error > Fatal error: Call to undefined function pg_connect() > > It seems that php.exe does not recognize postgres functions. > > In \ms4w\Apache\cgi-bin\php.ini I have this: > extension=php_pgsql.dll and this dll is in \ms4w\Apache\php\ext Any errors in apache or system logs ? Could there be something this dll is missing? I don't know much about windows unfortunately but this may help figure out what else you need to include: http://www.dependencywalker.com/ -- Postgresql & php tutorials http://www.designmagick.com/