X-Original-To: pgsql-php@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CA67D476C9C for ; Fri, 16 May 2003 15:52:34 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 42495-09 for ; Fri, 16 May 2003 15:52:33 -0400 (EDT) Received: from seapdc01.PNTS (ip63.c216.blk1.bel.nwlink.com [209.20.216.63]) by postgresql.org (Postfix) with ESMTP id E1A59476C71 for ; Fri, 16 May 2003 15:52:32 -0400 (EDT) Received: from busbydev (BUSBY-DEV [10.0.0.17]) by seapdc01.PNTS with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id KZNGB6AF; Fri, 16 May 2003 13:05:33 -0700 Message-ID: <035801c31be3$fc2fe7f0$1100000a@busbydev> Reply-To: "David Busby" From: "David Busby" To: References: Subject: Re: Inquiry From Form [pgsql] Date: Fri, 16 May 2003 12:47:16 -0700 Organization: Pacific Northwest Ticket Service MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/19 X-Sequence-Number: 2024 Look for the files libpq.h and also libpq-fe??? something like that. Those are the PostgreSQL headers (.h) and libraires (.so) You'll have to have those for pg_connect to work. When PHP is built it needs to know where those are (in path with other includes and libraries? or something else (/usr/local?/opt/postgre)). /B ----- Original Message ----- From: "scott.marlowe" To: "Mark" Cc: ; "Marc G. Fournier" ; Sent: Friday, May 16, 2003 11:48 Subject: Re: [PHP] Inquiry From Form [pgsql] > On Thu, 15 May 2003, Mark wrote: > > > I have a Raq4i and I am trying to write PHP 4 to the PostgreSQL. But I > > keep getting undefined function: pg_connect() . I have the extension > > enabled and the PHP was compiled for postgreSQL. I do not understand > > what is going on? > > If PHP says pg_connect is undefined, then the php the RAQ is running isn't > compiled for postgresql connectivity. > > There are two common causes of this: > > 1: You compiled one build of PHP, the RAQ is running on another build. > > 2: You told PHP to build in postgresql connectivity, it couldn't find the > right header file, failed, writing an error message to the screen during > configuration, saying something along the lines of "could not find file > xxxxx.h" skipping postgresql configuration. > > PHP will then happily build and run, without postgresql capabilities. > > Try this: > > write a web page with this in it: > > phpinfo(); > ?> > > Look through the page to see if it mentions postgresql. At the top will > be a list of all the switches it was configged with. If you have a > --with-pgsql there, but no pgsql section in phpinfo, then the configure > script couldn't find the right headers. Make sure you're running a fairly > late model version of both PHP and postgresql, as there was a bit of an > issue about a year ago when postgresql changed the name of one of it's > connection headers. > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)