agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Kacper Nowicki <Kacper.Nowicki@fuw.edu.pl>
To: Casey Claiborne <mskc@io.com>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: NCSA and postgres dont like each other
Date: Tue, 11 Jul 1995 10:40:03 +0200 (MET DST)
Message-ID: <Pine.SUN.3.91.950711103300.545G-100000@ccfs1> (raw)
In-Reply-To: <199507110406.XAA24519@tristero.io.com>
On Mon, 10 Jul 1995, Casey Claiborne wrote:
> What is happening is as follows:
>
> 1) HTML form is displayed
> 2) press "submit" button on HTML form
> 3) cgi-srcipt takes data fromt the form
> 4) data from the form is sent to routine listed below for placement
> into database.
> 5) at the point when either 'PQexec("end")' or 'PQfinish()' are executed,
> the NCSA server screen is displayed with an error code of 500.
...
> This database routine works just fine by itself - if I take the
> code below, place it into a C routine, compile and run it, I have no
> problems at all. Everything happens as it should - information goes into the db.
> After some troubleshooting, I have found that the error occurs when either
> of the following are executed: PQexec("end") OR PQfinish()
>
> Question is:
> Why is this happening?
Hi,
It happend several times to me and I think that problem lies in
environment. When you test this program you are probably logged as user
xxx which is registered as postgres user.
When httpd runs this program its environment is _strange_. User is
probably www (is it user a valid postgres user ?). Check also USER env.
variable which is used by libpq to authenticate connection.
Kacper
P.S. The nice idea is to set PQTTY variable to log POSTGRES errors on
server side, or to pipe both stdout and stderr to httpd.
------------------------------------------------------------------------
Kacper Nowicki e-mail: Kacper.Nowicki@fuw.edu.pl
Warsaw University =================================
Physics Department Computer Center
Hoza 69, 00-681 Warszawa, Poland fax:(48)(22)294309,(48)(2)6226154
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: Kacper.Nowicki@fuw.edu.pl, mskc@io.com
Subject: Re: NCSA and postgres dont like each other
In-Reply-To: <Pine.SUN.3.91.950711103300.545G-100000@ccfs1>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox