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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP 5-Apache 1.3: The requested method POST is not allowed...

Status
Not open for further replies.

patricktr

Programmer
Feb 3, 2008
12
GB
I am running Windows XP pro - fully up to date.

I have installed Apache 1.3.41 (I couldn't get either 2.2 or 2.0 to work but that's another story).

I have installed the latest version of php (5 something, version 4 is not available from the php site).

I am following a simple dynamic web building excercise (I work in IT but I am new to web developments) - first excercise - input name - output text string concatinated with name input on previous screen .... should be easy - time alocated for excercise - 30 minutes.

Everything coming along nicely until I hit the submit button and then ...

"The requested method POST is not allowed....."

Does anyone know what this means or how to fix it? Or where I can get a previous version of php that might be ,more compatible with Apache 1.3?

Regards.
Patrick.
 
change the form method to get or change your apache httpd.conf file to allow post methods.

 
Can you show us your code for the form, so we know what you are doing?

It sounds more like an Apache problem, have you checked that apache is allowing POST requests?

Perhaps you might be better off using a Packaged version, with a nice windows installer that will configure everything for you, such as Easyphp.




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
also, i see you have not been able to get apache working. i'd guess you have a virus or a corrupt installation of apache. there is no reason why you should not be able to use apache2.*.

however, when i developed on win boxes with php, i always used IIS. it was no more than a couple of minutes to set up, easily administered and never a problem.


 
Guys - impressively speedy response, love it.

I am following Dreamweaver MX 2004 with asp, coldfusion and php by Jeffrey Bardzell ... lesson 4 ... so this is not cutting edge stuff.

First form - input name.
<body>
<form name="frm_name" id="frm_name" method="post" action="test_form_processor.php">
First Name
<input name="firstName" type="text" id="firstName" />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>

Second form output name

<body>
<p>Thank you, <?php echo $_POST['firstName']; ?>, for filling out my form.
</p>
</body>

Embarrassing I know but you've got to start somewhere.

What Directive should I look for in the conf file? Sorry but I need spoon feeding at this stage.

Thanks for the help.
P.
 
assuming get requests are allowed, just change the form method to get from post.

make sure that any <Limit> directives exclude POST and GET for a standard type installation on a dev server.

eg
Code:
<Limit POST PUT DELETE>
Require valid-user
</Limit>
is bad in that it blocks post requests from all except authenticated users.

on the other hand this would be ok
Code:
<Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
</Limit>
as in this case the limitation is that all(comers) should be allowed access. LIMIT directives should always be accompanied by LimitExcept

also ensure that any <LimitExcept directives INCLUDE POST and GET (and anything that you have specified in the limit directive)
eg.
Code:
<LimitExcept GET POST>
Deny from all
</Limit>

is ok if you want to allow get and post but deny any other aribtrary method.

ensure you restart the apache server after every config change.

if you want more help on apache then i'd recommend you to the chaps in the apache forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top