Really a very interesting and common problem I found today. The solution is more interesting than the Problem.
This error can occur in several situations. The following list includes some of the most common reasons developers encounter this issue:
- The action attribute of a form does not point to an executable script or there is no file specified for the action (in which case, the action field in the Property inspector is blank).
- The form’s action attribute points to an HTML file.
- A developer saves web pages with an HTM or HTML file extension instead of ASP, PHP, CFM or JSP file extensions, and specifies HTM or HTML as the default file extension in the site definition.
Things to look for when receiving this error:
- Specify an action attribute in the form’s Property inspector
The action field cannot be left blank and must specify an executable file. Common valid file types for the form action attribute include ASP, JSP, CFM, PHP, EXE, DLL or CGI. If you use one of Dreamweaver’s application objects—such as an Insert Record or Update Record—you may instead see a variable similar to<%=MM_editAction%>. - Check file extension of the web page producing the error
The page must have a file extension of ASP, PHP, ASPX, CFM or JSP. If the page has an extension of HTM or HTML, it will need to be renamed with the default extension for the server model specified in the site definition. - Check that the correct page type is specified in the site definition
Check the server model field in the Testing Server category of the site definition. The server model should match the correct language.
Another solution:
PHP: This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning.
Please visit to find the solution: http://www.somacon.com/p126.php
One most important thing is that ”your web server must support the php, asp or cgi whatever scripting language you are using”. Please check is your web server support the scripting language you are using in your web site else it can generate this error. This is one of the major issue found in various problem. So plz check your web server.
If you feel this blog gives you a proper solution, please post your comments.
Regards,
Vijay Modi
Thanx, I found the direction helpful in resolution.
Chuck
http://www.thebestdealofyourlife.com
By: Chuck on May 7, 2007
at 3:35 pm
Hi,
I found it interresting but it didn’t resolved my problem yet… The form I’m using (to upload a file) is in a pop-up window (poped from my site). Can this cause the problem?
thanks
jb
By: jb on June 13, 2007
at 10:26 pm
Hi Jb,
No, thats cannot if you can work with other server pages too.
Regards,
Vijay Modi
By: Vijay Modi on June 14, 2007
at 6:13 am
Hey, thanks for the info. I followed the link here from linuxquestions.org. Thanks for providing the solution.
In my case I was using an shtml page which includes a perl script. By sending the form action to the shtml page I can pass the variables to the perl script only if I use GET. If I use POST I get the error message above.
Do you know if there is any way to pass the variables from a form using POST, to a Perl script that is included in an shtml page?
If you want to see the example it is here http://www.coldrick.com.au/trivia.shtml which is currently working using GET. If you want to see the results using POST just go to http://www.coldrick.com.au/triviatest.shtml and click any of the buttons in the main body of the quiz area. Once you get the error you will need to highlight the address bar and hit enter to get back to the page as I have disabled back-buttoning to stop people going back and re-trying the same question.
Any help you can provide would be appreciated.
Rgds
By: Barry on June 27, 2007
at 10:39 pm
Thank you!
By: Lqkyikkk on July 11, 2007
at 1:43 am
interesting thank you…
By: Syrjirsa on August 30, 2007
at 11:56 am
no luck
By: ken on September 12, 2007
at 10:54 pm
Thank You!!!!!
By: F.E.A.R on October 10, 2007
at 12:41 pm
new super sites
good worck baby
senks
By: Utervevop on November 8, 2007
at 1:49 am
None of these worked for me. here is the site if you can suggest a fix I’d be very happy.
http://sun.iwu.edu/~bwathen/intake.html
By: Brian on November 9, 2007
at 9:50 pm
hi,
Thanks for your solution.This solution helped me alot.
Thanks & Regards,
satya veni
By: satyaveni on November 15, 2007
at 3:56 am
Just to mention another reason : do not forget to set the content-type to x-www-form-urlencoded
By: Visitor on November 29, 2007
at 6:29 pm
Hi, I get this error when I try to see a JSP pages.
Do you know what could be the problem?
Thanks
By: Ana Azuaje on February 1, 2008
at 12:53 pm
Hey,
Your advice helped, thank you. But it did not maked any sence to me. Because I have a html submission forms that had this errors. Which I had for a while. Some of those forms suddenly stop working and giving me the above error. Once I rename the pages to php. It start working. But like I sayd it is not making sense. Because some of my exactly same forms are working as html and some I had to change to php.
Do you have any explanation to that?
By: Lana Boyd on April 14, 2008
at 1:12 am
sdfsdf
By: JAIRO on August 13, 2008
at 10:18 pm
Thanks I have a working website now!
By: Lindsay on October 25, 2008
at 7:26 pm
I agree with you but I have a probem that when i check the code in wamp sever that time it show smtp and prot problem show mail fucntion what that mean I have no exp.. of php not full but i knew basic code of php plz show my problem
By: rawan on November 23, 2008
at 6:52 am
Lana, I had the same thing happen–forms that worked all of a sudden stopped working.
Could it be that your webhost upgraded the version of PHP? I wonder if the most recent version handles something differently.
By: Susie on January 1, 2009
at 10:12 pm
!
By: jump on February 1, 2009
at 2:57 pm
This didn’t work for me, are there any other solutions?
By: Classified Ads on February 22, 2009
at 6:13 pm
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
By: Alexwebmaster on March 3, 2009
at 8:52 am
Hi Genius,
Sure,, u can share it here.
By: Vijay Modi on March 3, 2009
at 10:36 am
SORRY FOR SCREAMING – but the easiest thing is this possibly
you get say…
………..method=”post” was not found on this server
(or get, with quite literally with ” “)
if you have copied/paste this, try it without the “” so…
method=post
or
method=get
(i.e. NO “”s)
By: Josabooba on May 18, 2009
at 1:06 am
Yep looks fine – works well!
By: Classifieds on May 21, 2009
at 8:06 am
I have an e-card script that worked great before I switched hosting companies. Now I can’t figure out what’s wrong. I get this error, ” The requested method POST is not allowed for the URL.”
Location:
http://www.tnwcreations.com/cards
CGI file location:
http://www.tnwcreations.com/cards/card.cgi
I am using a Linux server.
What am I doing wrong? I checked the extension and it’s correct.
BTW, I LOVE your website, it’s so professional and positive.
Erin Kay
By: Erin Kay on June 1, 2009
at 12:15 am