Re: Inquiry From Form [pgsql]

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Mark <mbergman(at)brunson(dot)us>
Cc: <info(at)pgsql(dot)com>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: Inquiry From Form [pgsql]
Date: 2003-05-16 18:48:56
Message-ID: Pine.LNX.4.33.0305161243470.4710-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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:

<?php
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.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message David Busby 2003-05-16 19:47:16 Re: Inquiry From Form [pgsql]
Previous Message Mark 2003-05-15 21:37:29 Inquiry From Form [pgsql]