MyBB Community Forums

Full Version: Error 406 in AdminCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have changed my admin password to "test"

My user name is "Kesava" and my password is "test".

I'll post it here because I'll change it afterwards and I haven't done anything with the forum yet. Once I figure out the problem I'll reinstall it anyway.
I used your test password to log in and see what you are seeing.
I found a couple of sites to read about 406 errors and one post in webmasterworld that may help. Since this only happens in the ACP do you have an .htaccess in the admin directory?

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

http://www.webmasterworld.com/apache/3751387.htm

http://www.webmasterworld.com/forum92/854.htm
i had this problem with some php scripts as well. i tracked it down to the force-type directive which i used in my .htaccess

it occured when accessing a virtual subfolder path. e.g.
photos/12/2003 and using in my .htaccess

<Files photos>
ForceType application/x-httpd-php
</Files>

i stopped using that and changed everything over to addhandler and the headers were correct again - even without the .htm extension
Here are the contents of the .htaccess file:

Quote:Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
# the setting enabled in the Admin CP and you have this file
# named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

Is there anything there that looks relevant? I couldn't see any force type things anywhere.

If you need access to anything else then please let me know and I can make an account.
(2010-03-09, 12:55 AM)Kesava Wrote: [ -> ]Well 406 is the "not acceptable" error and is mentioned in that mod_security wiki.

403 is mentioned there, 403 is not a 406. I can't ever remember seeing a 406 before, but can you ask your host to disable mod_security anyway and see if it helps??
Has a solution to this been found yet? Because I have the exact same problem.

To recap:

I have successfully installed the board.
System Health shows green and I'm fairly sure all CHMODs are correct.
I've changed htaccess.txt to .htaccess and it reads the same as the OP quoted earlier.
I can log in and view the board, but trying to use any AdminCP links (eg sidebar) brings up a 406 error:

Quote:Not Acceptable

An appropriate representation of the requested resource /forum/admin/index.php could not be found on this server.

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

Extract from my error log on cPanel:
Quote:[Wed Mar 17 20:45:51 2010] [error] [client 62.56.66.132] File does not exist: /home/asiocity/public_html/406.shtml, referer: http://www.asiocity.com/forum/admin/inde...dule=tools
[Wed Mar 17 20:45:48 2010] [error] [client 62.56.66.132] File does not exist: /home/asiocity/public_html/406.shtml, referer: http://www.asiocity.com/forum/admin/inde...dule=tools
[Wed Mar 17 20:45:14 2010] [error] [client 62.56.66.132] File does not exist: /home/asiocity/public_html/406.shtml, referer: http://www.asiocity.com/forum/admin/inde...dule=tools
[Wed Mar 17 20:45:12 2010] [error] [client 62.56.66.132] File does not exist: /home/asiocity/public_html/406.shtml, referer: http://www.asiocity.com/forum/admin/inde...dule=tools

I've contacted my webhost who whitelisted me after the first problem. They say that changes to mod_security rules at their end should not matter if I have used .htaccess to disable mod_security. The problem is with .htaccess - either the changes have not worked or the format is wrong.

Question about htaccess. If it has code to disable mod_security then why doesn't it always do that? Why do you tell people to get their webhost to disable it?

I've read the stickied thread about ACP issues, and have no access to check or change most AdminCP settings due to the problem.

I see that the original poster has since installed phpBB instead, which unfortunately doesn't fill me with hope.

All help and ideas appreciated.
As far as I know you're the only people who have got a 406 here so it's not exactly a common error. If .htaccess is an issue, rename it to htaccess.txt so it won't be having any effect.
(2010-03-17, 09:50 PM)MattRogowski Wrote: [ -> ]As far as I know you're the only people who have got a 406 here so it's not exactly a common error. If .htaccess is an issue, rename it to htaccess.txt so it won't be having any effect.
I've tried it both ways and without it at all. Same result every time.

If there really is no solution I may have to hope 1.6 is released fairly soon?
Then it's nothing to do with the .htaccess if it's called htaccess.txt or if it's not even there... it has to be something on their end as there's nothing else that would cause it. There is no ETA for 1.6 but it will be in beta soon.
(2010-03-17, 09:56 PM)MattRogowski Wrote: [ -> ]Then it's nothing to do with the .htaccess if it's called htaccess.txt or if it's not even there... it has to be something on their end as there's nothing else that would cause it. There is no ETA for 1.6 but it will be in beta soon.
I will wait for 1.6. I wasn't keen on messing with mod_security to start with and less so if I have to badger my webhost as well. The irony is that MyBB has a very straight forward install which helped draw me to it. I do not need the forum set up immediately and may manage by filling any gap with another bb.
Yes, sorry, I never did find a solution. I contacted my host and they told me that I could disable mod_security myself with the code in the .htaccess file. I did that and still it didn't help. My host has no idea what else could be wrong and neither do I so I gave up and installed phpBB.

I am also hoping that a later version of mybb works and that I can import my current forum to mybb later. Then everything should work out fine, but I wish I was able to fix this problem now instead.
Pages: 1 2