You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "FISHER,JOE (Non-HP-Roseville,ex1)" <jo...@non.hp.com> on 2002/02/11 20:36:29 UTC

METHOD NOT ALLOWED

I'm getting the following error when I attempt to submit a form, using the
POST method:

The requested method POST is not allowed for the URL /~webuser/form1.php.

The Apache access_log shows the following errors:

[10/Feb/2002:23:27:07 -0800] "POST /~webuser/form1.php HTTP/1.1" 405 248

I'm attempting to POST to a PHP document, from an HTML form.

<form action="main.php" method="post">

The error / status code "405" indicates that the method specified in the
Request-Line is not allowed for the resource identified by the
Request-URL...
I know that the error isn't PHP related, as I've substituted a dummy / test
PHP form, in place of the actual form, and it still bombs... This test PHP
form executes properly, when executed by itself...
The main.html form also executes properly, if I substitute a "GET" in place
of the "POST" method... 
Unfortunately, I need to execute the POST method... GET won't work with my
PHP script...
I believe the problem is with one of my webserver settings, some type of
permissions error, but haven't been able to figure out what it is...
This is not a PHP issue... This is an HTML / Apache issue...

I've already executed the EXACT same scripts under HP-UX, and everything
works fine...

The POST method is a standard HTML issue, but the permissions I speak of,
are probably configured in Apache...

I've gone line-by-line through my http.conf file, and found the one and only
section pertaining to <limit POST GET, etc..., but have not figured out what
to modify...

I also have an Apache Web Server Administration manual, and have not been
able to find anything on this particular error...

So, I'm looking for anyone who may have encountered this "405" error
before... 
Someone who might be able to tell me why this isn't working, and suggestions
on how to fix it... 
Thanks in advance...
Joe F.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: METHOD NOT ALLOWED

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Joshua Slive wrote:
> 
> If I remember correctly, the default httpd.conf contains a section that
> forbids POSTs in user directories.

Actually, I think the problem is that the server hasn't been
told this is a script.  Apache disallows upload operations to
resources that can't deal with them (like raw text files).
If you try accessing it with a GET rather than a POST, do you
get the raw uninterpreted PHP statements?  If so, this is your
problem.  You'll need to add something like

AddType application/x-httpd-php .php

so that mod_php will be correctly invoked for it.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


RE: METHOD NOT ALLOWED

Posted by Joshua Slive <jo...@slive.ca>.
> From: FISHER,JOE (Non-HP-Roseville,ex1)
> [mailto:joseph_fisher@non.hp.com]

> I'm getting the following error when I attempt to submit a form, using the
> POST method:
>
> The requested method POST is not allowed for the URL /~webuser/form1.php.
>

> I've gone line-by-line through my http.conf file, and found the
> one and only
> section pertaining to <limit POST GET, etc..., but have not
> figured out what
> to modify...

If I remember correctly, the default httpd.conf contains a section that
forbids POSTs in user directories.  You will need to modify that so that
POST is included in the list of allowed methods, rather than the list of
denied methods.  If you need details, you'll need to post the relevant
section of your config file.

Joshua.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org