Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3A868475153 for ; Mon, 12 Aug 2002 11:56:55 -0400 (EDT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id 9A2F1474E49 for ; Mon, 12 Aug 2002 11:56:54 -0400 (EDT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.4/8.12.4) with ESMTP id g7CFu1ZP020035; Mon, 12 Aug 2002 09:56:02 -0600 (MDT) Date: Mon, 12 Aug 2002 09:40:22 -0600 (MDT) From: "scott.marlowe" To: Carlos Cc: Lista PostgreSQL Subject: Re: can't connect to a postgreSQL database from PHP In-Reply-To: <001a01c2413a$1b24cb60$cb11a8c0@almah> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/35 X-Sequence-Number: 1380 On Sun, 11 Aug 2002, Carlos wrote: > HelpHi everybody! > > I've got a problem using PHP to connect to a postgre database, it seems that > the function for postgre are not recognized or something like that because a > I get the following error in the web navigator: > "Fatal Error: Calling to undefined function pg_connect() ...)" > > I configured php with: ./configure --with-apache=/usr/local/apache_1.3.26 > --with-pgsql=shared > --enable-track-vars > --with-xml Why do you have --with-pgsql=shared? Normally, you just need the switch --with-pgsql. when you ran the ./configure script, did you save the output and see whether it said it found and configured postgresql? My bet is that it failed during ./configure and you didn't notice, as it won't cause the ./configure script to error out. Also, I'd recommend compiling apache for DSO support, i.e. using the --with-apxs switch setting. I've seen problems show up with using the .a libs instead of .so. Since shared objects seems the preferred methodology, it seems like problems with configuration that affect dso get fixed much quicker than static libs.