I'm using Drupal Services Module to upload data to my site. It works good on local host, and I can do PUT and POST without problems. But after upload my site to a shared hosting, I can do POST, but PUT always get "Forbidden" errors. For exmple, when I try to update a taxonomy term, it returns "Forbbiden. You don't have permission to access taxonomy_term/2601", where 2601 is a taxonomy term previously created with POST and the same web service's user. And this user has permission to edit this term. Any suggestion? Thanks.

| improve this question | | | | |
  • are you sending the sessionid, cookies and token in the header for your PUT request? – prashant_sh Jun 23 '15 at 11:40
  • Yes. As I said, It works good on my local server (xampp). The problem has appeared after upload the site to a shared hosting. POST works but PUT not. – briast Jun 23 '15 at 11:49
  • What kind of web server is your shared hosting running? e.g. apache – Scott Anderson Jun 23 '15 at 12:21

Assuming it is an apache web server you could try this in your .htaccess file.

  Allow from all

Otherwise you may need to contact the hosting support to see if they have restricted PUT requests

| improve this answer | | | | |
  • That is the problem. The hosting have a mod_security restriction not allowing PUT nor DELETE. I have requested to change this restriction. Thanks for your answer. – briast Jun 23 '15 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.