Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method Not Allowed (405)

Status
Not open for further replies.

Henning

Programmer
Mar 18, 2002
10
0
0
DE
Hopely someone can help me:
Which setting in Apache is wrong if i get this error msg?
Method Not Allowed
The requested method POST is not allowed for the URL.
Apache/1.3.20 Server at subdomaine.maindomaine.de Port 80

Gretting Henning
 
Unless you've done something tricky with your web
server, it will do both GET and POST as installed.
Sometimes the error messages from Apache don't
quite point to the exact problem. My first guess
is that you have something wrong with your CGI code.
I would try running a very simple CGI to demonstrate
that Apache is setup and working correctly.


Here is a very simple peice of HTML with an input field.
Modify the <FORM ACTION=&quot;?????&quot; METHOD=&quot;POST&quot;> to point
at peice of CGI below.
Code:
<HTML>
<HEAD><TITLE>Simplest Input Page</TITLE></HEAD>
<BODY>
<FORM ACTION=&quot;/cgi-bin/simple.cgi&quot; METHOD=&quot;POST&quot;>
<P>email, please: 
<INPUT TYPE=&quot;TEXT&quot; WIDTH=&quot;25&quot; NAME=&quot;E_ADD&quot;>
</P>
</FORM>
</BODY>
</HTML>
[code]

Here is a very simple peice of CGI that catches the
email entered into the HTML input page above.  Cut,
paste and save this into your cgi dir and name it 
simple.cgi (consistent with the html above).
[code]
#!/usr/local/bin/perl
use CGI; # load the CGI module
$q = new CGI; # retrieve inputs into an object, $q

# get the parameter named 'E_ADD' from the object, $q 
$email = $q->param('E_ADD');

# print some compliant html to the browser
print $q->header;
print $q->start_html;
print &quot;<P>Email is $email</P>\n&quot;;
print $q->end_html;

Note that the Method specified in the HTML action tag
is POST. Once you get a very simple POST working, you can be sure that Apache is not the problem (it may be, but I don't think so , YET).

If you continue to have problems, check thread219-231854 . And if that does not help, try here again and we'll keep
chasing it. 'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top