UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > cPanel Shared Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 21-04-2008, 16:41
Member
 
Join Date: Nov 2007
Posts: 49
Default Getting a 405 error when submitting a form

Hi there,

Any help would be much appreciated. I've just set up a simple form and a straight forward PHP script.

However, when I go to submit information I'm getting the following error message:

Code:
Method Not Allowed
The requested method POST is not allowed for the URL /index.html.
Can anyone help me?

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 22-04-2008, 08:36
System Administrator
 
Join Date: Dec 2006
Location: localhost
Posts: 715
Thumbs up

Hi Jon,

Could you please copy paste the form content/code/script here ? There are several reasons for a form submission throwing that 'not much liked 405 error'.

Here's a common checklist to overcome it [hope this helps..] :

1)
Set the action to the actual page or script that will be doing the processing for the form for a start.

2)
Do not "nest' form tags, close one form tag & then start other.

3)
Check file extension of the web page producing the error..

4)
Specify a correct action [post/get] attribute in the form's property, it shouldn't be html, it should be some sort of script.

5) In
PHP,this is almost 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...

Or if you open up a support ticket, we'd be able to fix the issue quicker or you'd get a faster response...
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18-08-2008, 20:28
new member
 
Join Date: Aug 2008
Posts: 2
Default

Hi all, I'm having the exact same problem with my booking form, I have the booking_form.php file uploaded on my web-server and Ive got the form code embedded in my webpage, the form displays on the page, but when I hit the submit button, instead of performing the validation it comes up with the old 405 METHOD NOT ALLOWED error - The requested method POST is not allowed for the URL /booking_form.php !! I've tried everything but still no luck.


Below is my webpage code:

HTML Code:
<p>
   <link rel='STYLESHEET' type='text/css' href='/html/booking_form.php?sfm_get_ref_file=booking_formstyle.css'>
   <script language='JavaScript' src='/html/booking_form.php?sfm_get_ref_file=genvalidator.js'>
   </script>
   <form name='booking_form' method='POST' action='/html/booking_form.php' accept-charset='UTF-8'>
      <input type='hidden' name='sfm_form_submitted' value='yes'>
      </input>
      <table cellspacing='0' cellpadding='10' border='0' bordercolor='#000000'>
         <tr>
            <td>
               <table cellspacing='2' cellpadding='2' border='0'>
                  <tr>
                     <td colspan='2' align='center' class='form_heading'>
Make a Reservation for your animal(s)
                     </td>
                  </tr>
                  <tr>
                     <td align='right' class='required_field'>
Email*
                     </td>
                     <td class='element_label'>
                        <div id='booking_form_Email_errorloc' class='error_strings'>
                        </div>
                        <input type='text' name='Email' size='20'>
                     </td>
                  </tr>
                  <tr>
                     <td align='right' class='normal_field'>
ContactTel
                     </td>
                     <td class='element_label'>
                        <input type='text' name='ContactTel' size='20'>
                     </td>
                  </tr>
                  <tr>
                     <td colspan='2'>
                        <hr>
                        </hr>
                     </td>
                     <tr>
                        <td colspan='2' class='form_subheading'>
Pet Details
                        </td>
                     </tr>
                     <tr>
                        <td align='right' class='required_field'>
No of Pets*
                        </td>
                        <td class='element_label'>
                           <div id='booking_form_no_of_pets_errorloc' class='error_strings'>
                           </div>
                           <input type='text' name='no_of_pets' size='5'>
                        </td>
                     </tr>
                     <tr>
                        <td align='right' valign='top' class='required_field'>
If more than one animal, are they to share or be seperated?*
                        </td>
                        <td class='element_label'>
                           <div id='booking_form_share_seperate_errorloc' class='error_strings'>
                           </div>
                           <input type='radio' name='share_seperate' value='Share'>
Share                           <br>
                           <input type='radio' name='share_seperate' value='Seperate'>
Seperate                           <br>
                           <input type='radio' name='share_seperate' value='N/A'>
Not Applicable (n/a)                           <br>
                        </td>
                     </tr>
                     <tr>
                        <td colspan='2' align='left' valign='bottom' class='normal_field'>
Pet Details (breed,sex,age,conditions etc.)
                        </td>
                     </tr>
                     <tr>
                        <td>
                        </td>
                        <td class='element_label'>
                           <div id='booking_form_PetDetails_errorloc' class='error_strings'>
                           </div>
<textarea name='PetDetails' cols='50' rows='10'></textarea>
                        </td>
                     </tr>
                     <tr>
                        <td align='right' valign='top' class='required_field'>
Where do you want your pet housed?*
                        </td>
                        <td class='element_label'>
                           <div id='booking_form_indoors_outdoors_errorloc' class='error_strings'>
                           </div>
                           <input type='radio' name='indoors_outdoors' value='Indoors (cage)'>
Indoors (cage)                           <br>
                           <input type='radio' name='indoors_outdoors' value='Outdoors (hutch / cage)'>
Outdoors (hutch / cage)                           <br>
                           <input type='radio' name='indoors_outdoors' value='No preference'>
No preference                           <br>
                        </td>
                     </tr>
                     <tr>
                        <td align='right' valign='top' class='normal_field'>
Specify Feeding \ Grooming Requirements
                        </td>
                        <td class='element_label'>
<textarea name='FeedingRequirements' cols='25' rows='5'></textarea>
                        </td>
                     </tr>
                     </tr>
                     <tr>
                        <td align='right' class='required_field'>
                        <td align='right' class='normal_field'>
How did you hear about us?
                        </td>
                        <td class='element_label'>
                           <input type='text' name='hear_about' size='20'>
                        </td>
                     </tr>
                     <tr>
                        <td>
                        </td>
                        <td class='element_label'>
                           <div id='booking_form_i_agree_errorloc' class='error_strings'>
                           </div>
                           <input type='checkbox' name='i_agree' value='agree'>
I Agree to the Terms and Conditions Listed On This Site
                        </td>
                     </tr>
                     <tr>
                        <td colspan='2' align='center'>
                           <div id='booking_form_Submit_errorloc' class='error_strings'>
                           </div>
                           <input type='submit' name='Submit' value='Submit'>
                        </td>
                     </tr>
                  </tr>
               </table>
            </td>
         </tr>
      </table>

<script language='JavaScript'>var booking_formValidator = new Validator("booking_form");

booking_formValidator.EnableOnPageErrorDisplay();
booking_formValidator.EnableMsgsTogether();
booking_formValidator.validate_on_killfocus = true;
booking_formValidator.addValidation("Name","req","Please fill in Name");
booking_formValidator.addValidation("Address","req","Please fill in Name");
booking_formValidator.addValidation("Email","email","The input for Email should be a valid email value");
booking_formValidator.addValidation("Email","req","Please fill in Email");
booking_formValidator.addValidation("no_of_pets","req","Please fill in Name");
booking_formValidator.addValidation("share_seperate","selone","Please select yes or no");
booking_formValidator.addValidation("PetDetails","maxlen=10240","The length of the input for Message should not exceed 500");
booking_formValidator.addValidation("indoors_outdoors","selone","Please select yes or no");
booking_formValidator.addValidation("VetRegistered","req","Please fill in Name");
booking_formValidator.addValidation("ArrivalDate","regexp=^(\\d){1,2}/(\\d){1,2}/(\\d){2,4}$","Please enter a valid input for Date");
booking_formValidator.addValidation("ArrivalDate","req","Please provide the rquested date of appointment");
booking_formValidator.addValidation("arrival_time","selone","Please select income range");
booking_formValidator.addValidation("DepartureDate","regexp=^(\\d){1,2}/(\\d){1,2}/(\\d){2,4}$","Please enter a valid input for Date");
booking_formValidator.addValidation("DepartureDate","req","Please provide the rquested date of appointment");
booking_formValidator.addValidation("departure_time","selone","Please select income range");
booking_formValidator.addValidation("i_agree","selmin=1","Can't proceed as you do not agree to the terms & conditions");
</script>
   </form>
</p>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 18-08-2008, 20:47
eUK-Martin's Avatar
Windows System Administrator
 
Join Date: Nov 2005
Location: Earth
Posts: 457
Default

Hello,

Change the line 5 in your code from:

PHP Code:
<form name='booking_form' method='POST' action='/html/booking_form.php' accept-charset='UTF-8'
to

PHP Code:
<form name='booking_form' method='GET' action='/html/booking_form.php' accept-charset='UTF-8'
Let us know if that helps.
__________________
Martin
Windows System Admin.


Windows VPS Hosting - Windows Dedicated Server - Web Hosting Tutorials

Email :: windows @ eUKhost.com AND support @ eUKhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 18-08-2008, 22:32
new member
 
Join Date: Aug 2008
Posts: 2
Default

Quote:
Originally Posted by eUK-Martin View Post
Hello,

Change the line 5 in your code from:

PHP Code:
<form name='booking_form' method='POST' action='/html/booking_form.php' accept-charset='UTF-8'
to

PHP Code:
<form name='booking_form' method='GET' action='/html/booking_form.php' accept-charset='UTF-8'
Let us know if that helps.
i dont get the 405 message now, but when it tries to load the booking_form.php file it just displays all the code on the screen, strange?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 20-08-2008, 02:59
eUK-Martin's Avatar
Windows System Administrator
 
Join Date: Nov 2005
Location: Earth
Posts: 457
Default

I think it because the GET method is not allowing the code to parse. Would it be possible for you to post the link here as there are several other settings that we would like to check on it.
__________________
Martin
Windows System Admin.


Windows VPS Hosting - Windows Dedicated Server - Web Hosting Tutorials

Email :: windows @ eUKhost.com AND support @ eUKhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:11.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service