Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 31647 invoked by uid 500); 30 Jul 2003 15:19:02 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 31634 invoked from network); 30 Jul 2003 15:19:02 -0000 Received: from smtp809.mail.sc5.yahoo.com (66.163.168.188) by daedalus.apache.org with SMTP; 30 Jul 2003 15:19:02 -0000 Received: from unknown (HELO laptop) (bob.mahan@sbcglobal.net@166.90.211.70 with login) by smtp-sbc-v1.mail.vip.sc5.yahoo.com with SMTP; 30 Jul 2003 15:18:31 -0000 Reply-To: From: "Bob Mahan" To: , "'Robert Andersson'" Date: Wed, 30 Jul 2003 10:15:44 -0500 Organization: Network Security Operations Corp Message-ID: <001801c356ad$8432d280$0664a8c0@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <055101c35670$b51bf4e0$652e50d5@profundis.se> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] HTTPd 2.0 RH9.0 CGI UNIX sh GET form ARGC not 0 anymore? Thanks for your thoughts Robert. I have gone throught the httpd.conf file again and still don't see anything in there that might be causing this behavior. Here is a little better picture of what I'm doing that is causing this problem. Menu web page: link CGI shell script "form": if [ $# -eq 1 ] ; then KEY=$1 # gets value "SOME-DATA" (generate form from KEY...)
else (parce QUERY_STRING) (do backend stuff) fi For right now as a quick bandaide I have done exactly what you have suggested about looking into the QUERY_STRING to see if it set a hidden variable from the form with something like this: # if [ $# -eq 1 ] ; then # NOT WORKING WITH APACHE 2.0 !! if [ -z "`echo $QUERY_STRING | grep ^VAR1=`" ] ; then KEY=$1 # gets value "SOME-DATA" I will go back and see what kind of behavior and values the REQUEST_METHOD variable has and maybe that would be a better approach, at least until v3.0? ;) > Robert Andersson wrote: > Bob Mahan wrote: > > Using this sample snipet... > >
> > > > > >
> > ...Under 1.3 /cgi-bin/script gets... > > ARGC=0,ARGV="",QUERY_STRING="VAR1=VALUE&CMNT=foobar" > > ...Under 2.0 /cgi-bin/script gets > ARGC=1,ARGV="VAR1=VALUE&CMNT=foobar",QUERY_STRING="VAR1=VALUE&CMNT=foo > > I'm only guessing here, but this seems familiar, so I think > it is possible that Apache 2 introduced this behaviour. > > Surely there must be more reliable ways to detect whether to > generate the form or process submitted data. You could > possibly use POST method on the form and check the > environment variable REQUEST_METHOD to determine which side > of the script to use. I usually 'generate the form' unless a > certain query parameter is set to a certain value (hidden > field in the generated form), in which case I process the data. > > The above suggestions might be a bit off, as I don't clearly > see how you are using this script. If so, please give a bit > more detail on how the script (form generating variant) is > invoked (I don't understand why your script would generate a > form if ARGC is 1). > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org