Home > Software design >  php contact form 409 errors
php contact form 409 errors

Time:09-14

The website I made for my client is https://pariswashcompany.com/ On this website I get error 409 when the contact form is submitted

I purchased the contact form from bootstrapmade.com Which is a professional company and In their instructions, they say "Fully functional contact form Just change the email to yours in contact.php and it works after that". When I submit the contact form it throws me error 409 but my hosting company HostGator Cannot seem to solve it, so I was wondering if anyone else had run into this problem.

Solutions I have tried

1, Hostgator cleared website cache

2, we contacted the creator of the PHP contact form they said error 409 has to do with the hosting company (creator bootstrap made)

3, we contacted Hostgator and they told us to set our PHP to 7.4 within our cpanel

Any help is greatly appreciated at this point thanks.

CodePudding user response:

There are duplicate ids in the form. email and number have the same id. Ids should be unique.

<form action="/forms/contact.php" method="post" role="form" >
 <div >
 <div >
   <input type="text" name="name"  id="name" placeholder="Your Name" required>
 </div>
 <div >
   <input type="email"  name="email" id="email" placeholder="Your Email" required>
 </div>
 <div >
   <input type="number"  name="phone" id="email" placeholder="Your number" required>
 </div>
</div>
<div >
  <input type="text"  name="subject" id="subject" placeholder="Subject" required>
</div>
<div >
  <textarea  name="message" rows="5" placeholder="Message" required></textarea>
</div>
<div >
 <div >Loading</div>
 <div ></div>
 <div >Your message has been sent. Thank you!</div>
</div>
<div ><button type="submit">Send Message</button></div>
</form>

409 is about consistency/conflict

The HTTP 409 Conflict response status code indicates a request conflict with the current state of the target resource.

Conflicts are most likely to occur in response to a PUT request. For example, you may get a 409 response when uploading a file that is older than the existing one on the server, resulting in a version control conflict.

Reference : Mozilla : 409 Conflict

409 CODE REFERENCES

Rails HTTP Status Symbol :conflict

Go HTTP Status Constant http.StatusConflict

Symfony HTTP Status Constant Response::HTTP_CONFLICT

Python2 HTTP Status Constant httplib.CONFLICT

Python3 HTTP Status Constant http.client.CONFLICT

Python3.5 HTTP Status Constant http.HTTPStatus.CONFLICT

Reference : What Is a 409 Status Code?

CodePudding user response:

Okay thanks for all your comments i appretiate it hostgator fixed this by white listing my websites code originally the code was black listed by the hosting company

hostgators response Thank you for waiting. We successfully whitelist your contact form in a mod sec and it seems fixed it. Can you try again now?

It appears there's a script or code in the contact form that was blocked in mod security. No worries, it has been whitelisted permanently.

  • Related