http verb error

using a basic html page with a form

Page 1 of 1

4 Replies - 1979 Views - Last Post: 10 July 2010 - 04:28 AM

#1 Guest_djsinging*


Reputation:

http verb error

Posted 10 July 2010 - 02:08 AM

Html form page contains name and email fields and a submit button

Form action parameter = "sendmail.php"

sendmail.php contains

mail(...) .. command sending an email to the owner and the registration email provided

Now on submit it gives me a HTTP 405 - verb error

The site is hosted on a ucvhost account...

What seems to be the problem?

I used method POST/GET and checked still same problem...

Is This A Good Question/Topic? 0

Replies To: http verb error

#2 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2889
  • View blog
  • Posts: 7,535
  • Joined: 08-June 10

Re: http verb error

Posted 10 July 2010 - 02:19 AM

the host doesn’t allow the specified transfer type (GET, POST, etc.)

you’d either need to do a HEAD request (e.g. via AJAX) or read up the provider’s documentation about that to find out, which transfer types are allowed.

This post has been edited by Dormilich: 10 July 2010 - 02:20 AM

Was This Post Helpful? 0
  • +
  • -

#3 Guest_Guest*


Reputation:

Re: http verb error

Posted 10 July 2010 - 02:48 AM

View PostDormilich, on 10 July 2010 - 01:19 AM, said:

the host doesn’t allow the specified transfer type (GET, POST, etc.)you’d either need to do a HEAD request (e.g. via AJAX) or read up the provider’s documentation about that to find out, which transfer types are allowed.

Just thought this might add to the info...
hosted on www.UCVHost.com

When i tried creating an index.php file and access the same directly it gives me an error "Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
"
I guess the server has issues serving PHP???

index.html
<html>
<body>
<font face=Arial size=2> 
<form method="get" action="contact.php"> 
...
...
 </form> 
 </body>
 </html> 



contact.php
<?php 
$a = mail("mymail@domain.com", "Test subject", "Test Body", "From : my2mail@domain.com");
echo $a;
if($a){
echo "success";
}
else {
echo "fail";
}
?>


Was This Post Helpful? 0

#4 Guest_djsinging*


Reputation:

Re: http verb error

Posted 10 July 2010 - 03:12 AM

Just thought this might add to the info...
hosted on www.UCVHost.com

When i tried creating an index.php file and access the same directly it gives me an error "Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
"
I guess the server has issues serving PHP???

index.html
view source
print?
1 <html>
2 <body>
3 <font face=Arial size=2>
4 <form method="get" action="contact.php">
5 ...
6 ...
7 </form>
8 </body>
9 </html>


contact.php

01 <?php
02 $a = mail("mymail@domain.com", "Test subject", "Test Body", "From : my2mail@domain.com");
03 echo $a;
04 if($a){
05 echo "success";
06 }
07 else {
08 echo "fail";
09 }
10 ?>


View Postdjsinging, on 10 July 2010 - 01:08 AM, said:

Html form page contains name and email fields and a submit button

Form action parameter = "sendmail.php"

sendmail.php contains

mail(...) .. command sending an email to the owner and the registration email provided

Now on submit it gives me a HTTP 405 - verb error

The site is hosted on a ucvhost account...

What seems to be the problem?

I used method POST/GET and checked still same problem...

Was This Post Helpful? 0

#5 Guest_djsinging*


Reputation:

Re: http verb error

Posted 10 July 2010 - 04:28 AM

djsinging...

Based on the customer support suggestion that i cannot move from a static page to a dynamic one... I made index.asp and contact.asp and rewrote the send mail code in ASP

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="smymisr@gmail.com"
myMail.To="smymisr@gmail.com"
myMail.Bcc="smymisr@gmail.com"
myMail.Cc="smymisr@gmail.com"
myMail.TextBody="This is a message. ASP"
myMail.Send
set myMail=nothing
%>
<h1>
sent!
</h1>



error : Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Was This Post Helpful? 0

Page 1 of 1