• 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

digitalpoint

Well-known member
#2
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).
 
F

Floris

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

[edit] DP beat me to it.
 
#4
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} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [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>
 

Jake Bunce

XenForo moderator
Staff member
#5
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
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:

[Tue Apr 03 06:05:23 2012] [error] [client 193.210.148.122] File does not exist: /home/pbxinafl/public_html/501.shtml, referer: http://pbxinaflash.com/community/index.php?threads/nmap-scanner-by-phone.12267/
Could it be any of these add-ons??

 

digitalpoint

Well-known member
#7
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
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
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.
 

Jake Bunce

XenForo moderator
Staff member
#12

Digital Doctor

Well-known member
#15
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.
 
#17
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
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.
 

Digital Doctor

Well-known member
#19
There are other reports of Xenforo tripping mod_security.
There are also alot of reports of every php forum software tripping off mod_security.

I've got some articles I've been moving into the forum. There isn't anything special about the content but many times I experience an error posting them noting it as an internal server error. Nothing is posted in the error logs.

What I've found is that it's having a challenge with the word "from". Not all the time, but it seams to be an issue when I've got a higher word count. The workaround is to misspell it frrom and move forward.

I've tried disabling add-on's and using the default layout. Nothing more I can think to try. Any suggestions with this odd issue?

Thanks, South Fork
from: http://xenforo.com/community/threads/from.29318/

If it's a 500 error, that's likely coming from your web server -- your web server error log may have more details. You may need to contact your host. I have seen mod_security cause this.
From: http://xenforo.com/community/threads/error-500-just-my-account.24761/
 
#20
One of our gurus documented the problem using wireshark:

The problem is that thread's URL is activating mod_security. I've used mod_security before.

The 'alerts' GET is asking for this: [truncated] GET /community/index.php?account/alerts-popup&&_xfRequestUri=/community/index.php?threads/aastra-6757i-primary-tftp-server.12776/&_xfNoRedirect=1&_xfToken=5016,1333494663,257d7a9ebff8378efc5f9211948c0570f4e41d04&_xfResponseType

As you can see (its truncated here) it INCLUDES the url in question in itself.

The problem is this part '/community/index.php?threads/aastra-6757i-primary-tftp-server.12776'