1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Random 'Method Not Implemented' Errors

Discussion in 'Troubleshooting and Problems' started by NerdUno, Apr 3, 2012.

  1. NerdUno

    NerdUno Member

  2. digitalpoint

    digitalpoint Well-Known Member

    You probably want to check your server logs to see what the method is first. The "method" is referring to an HTTP method (most common is GET or POST), but there are various other HTTP methods... and the browser is trying to do some HTTP method your web server doesn't support.

    I ran a quick test on your web server and it looks like PUT and DELETE methods aren't supported by your web server (although not really sure why the browser would be trying either to be honest).

    Code:
    shawn$ curl -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19' http://pbxinaflash.com -X 'PUT'
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>501 Method Not Implemented</title>
    </head><body>
    <h1>Method Not Implemented</h1>
    <p>GET to / not supported.<br />
    </p>
    <p>Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.</p>
    </body></html>
    Notice the direct error message from your web server is exactly what you are seeing in the XF error (it's just barfing it back).
     
    Jake Bunce and Pereira like this.
  3. Floris

    Floris Guest

    I recommend checking your /var/logs/apache/error_log or where ever it is located.

    [edit] DP beat me to it.
     
  4. NerdUno

    NerdUno Member

    Our XenForo forum was ported over from vBulletin 3 and we're also running Tapatalk if any of that matters. Other than that it's a stock build. Here is what's in .htaccess (using PHP tags just to make it easier to read here). There's also a password requirement for admin.php access (not shown).
    PHP:
    #Mod_security can interfere with uploading of content such as attachments. If you
    #cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #SecFilterEngine Off
    #SecFilterScanPOST Off
    #</IfModule>
     
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
     
    <
    IfModule mod_rewrite.c>
    RewriteEngine On
     
    #If you are having problems with the rewrite rules, remove the "#" from the
    #line that begins "RewriteBase" below. You will also have to change the path
    #of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo
     
    #This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
     
    RewriteCond %{REQUEST_FILENAME} -[OR]
    RewriteCond %{REQUEST_FILENAME} -[OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule 
    ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </
    IfModule>
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Here is more information about the error:

    http://www.checkupdown.com/status/E501.html

    But I suspect this error is incidental in your case because a random 501 makes no sense. I am guessing your server has a rule against some text in the post you are submitting. If you can narrow down what word or character triggers the error then that may help. But ultimately you need to contact your host about this.
     
  6. NerdUno

    NerdUno Member

    Jake, I think it really is random. I've tried cutting-and-pasting contents of sample threads with the problem to new thread, and the new thread works fine. SO... it doesn't appear to be the actual content causing the issue.

    Here's what the Apache log shows when one of these pops up:

    Could it be any of these add-ons??

    [​IMG]
     
  7. digitalpoint

    digitalpoint Well-Known Member

    Doubtful... Such a random error doesn't magically migrate from your vB3 installation to XF. :)

    If you check your server logs to see what HTTP method is actually being called it should also show the referrer... which would help you pinpoint the culprit.
     
  8. NerdUno

    NerdUno Member

    We're seeing the issue in a few new posts as well. See above for the Apache log entry. As noted, I can cut-and-paste everything out of this thread to a new thread and the problem does not reappear.

    Calling up the referrer link shown in the Apache log, the thread displays perfectly. But you can't edit any post or add another comment in the entire thread.
     
  9. NerdUno

    NerdUno Member

    Probably should also mention that clicking on the referer link from the Apache log above displays the thread properly and generates no Apache error. It's only when you try to edit a post in that thread or add a new post in the thread that you get a 501 error.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It could be triggered by the referrer. I have seen this before, where a web server has rules against the referrer.
     
  11. Digital Doctor

    Digital Doctor Well-Known Member

  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  13. Digital Doctor

    Digital Doctor Well-Known Member

    Confirmed.
    It must be a server configuration thing.
     
  14. Digital Doctor

    Digital Doctor Well-Known Member

  15. Digital Doctor

    Digital Doctor Well-Known Member

    Just inserting the text of the error to help people find it in the future.

    The following error occurred:

    Method Not Implemented
    GET to /community/index.php not supported.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
     
  16. Digital Doctor

    Digital Doctor Well-Known Member

  17. NerdUno

    NerdUno Member

    Great links. Thanks, DigitalDoctor. I'll contact the provider. From the suggestions in the links, it looks as if it may be possible to avoid the errors with a minor change in the code. Knowing where to look is the trick and that's way above my pay grade. o_O
     
  18. NerdUno

    NerdUno Member

    As you might suspect, the provider is reluctant to turn off mod_security protection merely to fix a bug in a XenForo query syntax. What would be helpful obviously is to identify the actually query that is generating the problems.
     
  19. Digital Doctor

    Digital Doctor Well-Known Member

    There are other reports of Xenforo tripping mod_security.
    There are also alot of reports of every php forum software tripping off mod_security.

    from: http://xenforo.com/community/threads/from.29318/

    From: http://xenforo.com/community/threads/error-500-just-my-account.24761/
     
  20. NerdUno

    NerdUno Member

    One of our gurus documented the problem using wireshark:

     

Share This Page