Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id WAA17650 for postgres-redist; Tue, 11 Jul 1995 22:53:59 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199507120553.WAA17650@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from tristero.io.com (tristero.io.com [199.170.88.11]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with ESMTP id WAA17640 for ; Tue, 11 Jul 1995 22:53:58 -0700 Received: from dialup-221.austin.io.com (dialup-221.austin.io.com [199.170.90.43]) by tristero.io.com (8.6.12/8.6.12) with SMTP id AAA29979; Wed, 12 Jul 1995 00:53:21 -0500 Date: Wed, 12 Jul 1995 00:53:21 -0500 Message-Id: <199507120553.AAA29979@tristero.io.com> X-Sender: mskc@io.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Kacper Nowicki From: mskc@io.com (Casey Claiborne) Subject: Re: NCSA and postgres dont like each other Cc: postgres@postgres.Berkeley.EDU X-Mailer: Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Tue, 11 Jul 95 22:53:59 -0700 Resent-XMts: smtp Hi- thanks for responding. I found out that the NCSA server was being ran with a user of "nobody". This user was not entered into the my dbase acl list. When I changed the user in one of the NCSA config files from "nobody" to a valid user in my database, everything worked fine :^) Casey At 10:40 AM 7/11/95 DST), Kacper Nowicki wrote: > > >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/ > > Casey Claiborne mskc@io.com One must note the importance of setting reasonable and achievable goals for "If you aim for nothing, you'll hit it every time" ============================================================================== 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/