Forum Moderators: coopster
Before posting this post i have searched Werbmasterworld, but did not found any solution :( except explanation of error code, so i am putting my problem here.
My site was running fine yesterday, and today suddenly it is flashing Http 406 error message. I did not make any changes in code today, i am not able to trap what's the issue. Can any one please help me in solving this issue.
406 error message is appearing in alert box so i guess error is coming in any ajax file.
Regards,
Vinic
Have you had a look at the -
Accept:, Accept-Charset:,Accept-Encoding: ,Accept-Language:, Accept-Ranges:
and the respective Content-* headers coming from the server?
To see if there is anything in there that should not be there.
Are you also sure that no one else has been working with your code?
Actually site pages are loading properly but after page load a javascript alert box is coming showing this message
"
<!DOCTYPE HTML PUBLIC "//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An approppriate representation of the requested resource /incdex.php could not be found on this server.<p>
<HR>
<ADDRESS>Apache/1.3.39 Server at example.com Port 80</ADDRESS>
</BODY></HTML>
"
So is this server problem?
[edited by: eelixduppy at 6:46 pm (utc) on Jan. 15, 2008]
[edit reason] exemplified [/edit]
As you may find that when you look at the Content- headers returned by the page giving you the 406 that there is something wrong...like someone misspells and puts Content-Type: text/hmtl - as opposed to text/html. As your browser didnt ask for any text/hmtl you get a 406 error.
It may not be that simple, but it is worth checking.
Problem is sloved out, it was due to mod_security on, i have changed it to off using this code in htaccess file and now site is running fine.
"SecFilterEngine Off
SecFilterScanPOST Off"
I guess server settingw as changed to stop spammers or any other security reason.
Thanks for your kind help and prompt replies.
Options -MultiViews Also, make sure you're using
AddHandler not AddType for files to be parsed by PHP: AddHandler application/x-httpd-php .php If you use AddType then the PHP file will have the MIME type application/x-httpd-php rather than text/html, and the former is not in the Accept list of your request, hence the 406.
There are some earlier threads about Apache/PHP and 406 errors here which you might find useful:
[webmasterworld.com...]
[webmasterworld.com...]
This may fix your problem without having to disable mod_security.