You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeff Cohen <su...@gej-it.com> on 2003/07/25 00:58:36 UTC

RE: [users@httpd] You don't have permission to access

Make sure you do not have Redirect * /site2 in your conf file cause that
would loop you over and over as you can see.

All the best,
Jeff Cohen
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!



> -----Original Message-----
> From: System [mailto:system@eluminoustechnologies.com]
> Sent: Thursday, July 24, 2003 2:09 PM
> To: Apache
> Subject: [users@httpd] You don't have permission to access
> 
> Hello All,
> 
> I am on Apache 1.3.28/Redhat 8.0
> 
> When i Type http://domain.com it takes a lot of time to load the index
page
> and when the index page is loaded this what it i get on the address bar :
> 
>
http://domain.com/site2site2site2site2site2site2site2site2site2site2site2sit
>
e2site2site2site2site2site2site2site2site2site2site2site2site2site2site2site
>
2site2site2site2site2site2site2site2site2site2site2site2site2site2site2site2
> site2site2site2site2site2site2site2site2index.htm
> this on the main page.
> 
> Error :
> Forbidden
> You don't have permission to access
>
/site2site2site2site2site2site2site2site2site2site2site2site2site2site2site2
>
site2site2site2site2site2site2site2site2site2site2site2site2site2site2site2s
>
ite2site2site2site2site2site2site2site2site2site2site2site2site2site2site2si
> te2site2site2site2site2index.htm on this server.
> Additionally, a 301 Moved Permanently error was encountered while trying
to
> use an ErrorDocument to handle the request.
> 
> This is my index.htm
> cat index.htm
> <html>
> <h1>This is Sample Page </h1>
> </html>
> 
> Please put me on the correct path.
> 
> Regards,
> Tina.
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> 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


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


RE: [users@httpd] HTTPd 2.0 RH9.0 CGI UNIX sh GET form ARGC not 0 anymore?

Posted by Bob Mahan <bo...@sbcglobal.net>.
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:

  <a href="/cgi-bin/form?SOME-DATA">link</a>

CGI shell script "form":

  if [ $# -eq 1 ] ; then
    KEY=$1                       # gets value "SOME-DATA"
    (generate form from KEY...)
      <form method="get" action="/cgi-bin/form">
      <input name=VAR1 type=hidden value="VALUE1">
      <input name=CMNT type=text><input type=submit>
      </form>
  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...
> > <form method="get" action="/cgi-bin/script">
> >   <input name=VAR1 type=hidden value="VALUE1">
> >   <input name=CMNT type=text><input type=submit>
> > </form>
> > ...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 <URL:http://httpd.apache.org/userslist.html> 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


Re: [users@httpd] HTTPd 2.0 RH9.0 CGI UNIX sh GET form ARGC not 0 anymore?

Posted by Robert Andersson <ro...@profundis.nu>.
Bob Mahan wrote:
> Using this sample snipet...
>
> <form method="get" action="/cgi-bin/script">
>   <input name=VAR1 type=hidden value="VALUE1">
>   <input name=CMNT type=text><input type=submit>
> </form>
>
> ...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=fooba
> r"

I'm only guessing here, but this seems familiar, so I think it is possible
that Apache 2 introduced this behaviour.

> I thought I was being real slick when I wrote all these CGI programs to
> include not only the form generation, but the back end form processing
> in the same UNIX sh script and just look at the ARGC to see if the form
> generation (ARGC=1) or processing (ARGC=0) should be performed.  I'm
> praying that I have just not configured something right.

<pure_speculation>
    I doubt that if that behaviour was introduced in Apache 2, it is
possible to
    disable by a configuration directive. Sorry.
</pure_speculation>

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).

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


[users@httpd] HTTPd 2.0 RH9.0 CGI UNIX sh GET form ARGC not 0 anymore?

Posted by Bob Mahan <bo...@sbcglobal.net>.
Hi all,

I am attempting to upgrade from Apache 1.3 to 2.0 and have run into a
serious problem I'm hoping someone can enlighten me on.

I have seen several posts about GET and POST forms with PHP and
environmental variables not being passed that required some update in
PHP for global variables.  MY problem is just the opposite.  I have UNIX
shell scripts that under 1.3 have no command line parameters passed when
a GET Form is submitted but now under 2.0 are getting the QUERY_STRING
passed on the command line. I have looked at both the 1.3 and 2.0
access_log and they are both doing the same GET from what I see.

Using this sample snipet...

<form method="get" action="/cgi-bin/script">
  <input name=VAR1 type=hidden value="VALUE1">
  <input name=CMNT type=text><input type=submit>
</form>

...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=fooba
r"

I thought I was being real slick when I wrote all these CGI programs to
include not only the form generation, but the back end form processing
in
the same UNIX sh script and just look at the ARGC to see if the form
generation (ARGC=1) or processing (ARGC=0) should be performed.  I'm
praying
that I have just not configured something right.

Has anyone else seen this or have any ideas that might help?

Thanks in advance for any assistance :)

Bob




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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