Attempting to update the admin/settings page, I get this upon clicking the Submit button (even if I change nothing)

406 Not Acceptable

Not Acceptable
An appropriate representation of the requested resource /admin/settings could not be found on this server.

Comments

jax’s picture

Hi,

To be able to help you people need to know what version of drupal you are running and which modules are enabled.

If you can reproduce the error each time explain which steps need to be followed to achieve the error. Is the site publically available so that someone can confirm the bug?

Anyway, this is probably a problem with your webserver setup and how it plays with drupal.

Regards,
Olivier

radiobuzzer’s picture

Although it worked while I was setting up the website, I just found out I can't submit any changes to the Admin/Settings.

I get the previous reported 406 Error - Not Acceptable from my apache, whenever I click the submit button on the Settings panel, no matter if I have changed anything in the form or not.

We're talking about a 4.6.3 drupal, automatically install by my cpanel.

The funny thing is that when I click submit, I get the error BUT, some options chosen such as Enable/disable Clean URLS do get submitted, while any changes in the mission/footer boxes are discarded. Awkward?

sire’s picture

I get the 406 Error with 4.6.3 also. I'm assuming it's something about the type of data being posted contains some character or other that the server doesn't like. Maybe for security or sanitation purposes, etc.. I haven't been able to fix mine yet, but I think my research led to the previous conclusions. If you figure it out, let me know your fix ? If I resolve this, I'll post how.

radiobuzzer’s picture

I used the Mozilla LiveHeaders addon to browse the headers sent along with the settings page, both before and after clicking the Submit button.

before:

Host: sample.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; el-GR; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Accept: image/png,*/*;q=0.5
Accept-Language: en,el-gr;q=0.7,el;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-7,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://sample.com/admin/settings
Cookie: PHPSESSID=cb76d5af188bcbc3a097aa71966bfce0

after (inacceptable)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en,el-gr;q=0.7,el;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-7,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://sample.com/admin/settings
Cookie: PHPSESSID=cb76d5af188bcbc3a097aa71966bfce0
Content-Type: application/x-www-form-urlencoded
Content-Length: 2805
edit%5Bsite_name%5D=sample+on+line+&edit%5Bsite_mail%5D=info%40sample.com&edit%5Bsite_slogan%5D=-+%CE%B5%CE%BD%CE%AC%CF%82+%CE%BA%CF%8C%CF%83%CE%BC%CE%BF%CF%82+%CF%81%CE%B1%CE%B4%CE%B9%CE%BF%CF%86%CF%8E%CE%BD%CE%BF%CF%85%21&edit%5Bsite_mission%5D=%CE%97+%CF%80%CE%B1%CF%81%CE%BF%CF%8D%CF%83%CE%B1+%CE%B9%CF%83%CF%84%CE%BF%CF%83%CE%B5%CE%BB%CE%AF%CE%B4%CE%B1+%CE%B1%CF%80%CE%BF%CF%84%CE%B5%CE%BB%CE%B5%CE%AF+%CE%BC%CE%B9%CE%B1+%CF%80%CF%81%CE%BF%CF%83%CF%80%CE%AC%CE%B8%CE%B5%CE%B9%CE%B1+%CE%BF%CE%BB%CE%BF%CE%BA%CE%BB%CE%B7%CF%81%CF%89%CE%BC%CE%AD%CE%BD%CE%B7%CF%82+%CE%B4%CE%B9%CE%B1%CE%B4%CE%B9%CE%BA%CF%84%CF%85%CE%B1%CE%BA%CE%AE%CF%82+%CF%80%CE%B1%CF%81%CE%BF%CF%85%CF%83%CE%AF%CE%B1%CF%82+%CF%84%CE%BF%CF%85+%CE%B5%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%BF%CF%8D+%CF%81%CE%B1%CE%B4%CE%B9%CE%BF%CF%86%CF%8E%CE%BD%CE%BF%CF%85%2C+%CE%BC%CE%B5+%CE%B3%CE%BD%CF%8E%CE%BC%CE%BF%CE%BD%CE%B1+%CF%84%CE%BF%CE%BD+%CE%B1%CE%BA%CF%81%CE%BF%CE%B1%CF%84%CE%AE+%CE%BA%CE%B1%CE%B9+%CF%84%CE%B9%CF%82+%CE%B1%CF%81%CF%87%CE%AD%C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%BD%CF%85%CE%BC%CE%BF%CF%82&edit%5Bsite_frontpage%5D=node&edit%5Bclean_url%5D=1&edit%5Bsite_403%5D=&edit%5Bsite_404%5D=&edit%5Berror_level%5D=1&edit%5Bwatchdog_clear%5D=604800&edit%5Bcache%5D=0&edit%5Bfile_directory_path%5D=files&edit%5Bfile_directory_temp%5D=%2Ftmp&edit%5Bfile_downloads%5D=1&edit%5Bdate_default_timezone%5D=7200&edit%5Bconfigurable_timezones%5D=1&edit%5Bdate_format_short%5D=d%2Fm%2FY+-+H%3Ai&edit%5Bdate_format_medium%5D=D%2C+d%2Fm%2FY+-+H%3Ai&edit%5Bdate_format_long%5D=l%2C+j+F%2C+Y+-+H%3Ai&edit%5Bdate_first_day%5D=1&op=%CE%91%CF%80%CE%BF%CE%B8%CE%AE%CE%BA%CE%B5%CF%85%CF%83%CE%B7+%CF%81%CF%85%CE%B8%CE%BC%CE%AF%CF%83%CE%B5%CF%89%CE%BD
HTTP/1.x 406 Not Acceptable
Date: Sun, 11 Dec 2005 18:39:04 GMT
Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP-CGI/0.1b
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

As you can see on the second code, the Accepted content types are set on the 1st line. Though, the page has a content type (line 9) defined as application/x-www-form-urlencoded. Maybe it is that this content type is not defined as acceptable?
Also, it might be that my previous submission text fields contain a lot of greek characters that may have not been escaped correctly(?)

Unfortunately changing those text fields is important for the contruction of my website, so you will have news of mine soon.

radiobuzzer’s picture

it took me several hours of looking into the headers provided, into my apache specification, then I tried to directly modify the "variable" table into the database which was not very simple. Finally I started commenting out partially some lines in the system_view_general() of system.module code. (no, you don't need to do any of these)

Finally, I could figure out that the error was sth very simple...

In the texfield for temporary directory I had entered "/tmp" (with leading slash, instead of "tmp". For some reason this leading slash was creating some chaos in the headers passed from the apache to the browser.

I will report it as a bug...

sire’s picture

Thanks. Confirmed this on mine also. /tmp isn't acceptable. I made a directory 'tmp' and chmod it appropriately. I modified the /tmp setting to just 'tmp' and now it works fine.

Thanks

arnoldjrimmer’s picture

this is how i resolved it
I added this to my htaccess file: SecFilterEngine Off

i dont know what it does but it works!

www.comberonline.org

vyvee’s picture

I faced the same problem too. I haven't resolved it with the suggested ways, and I hope it won't happen often! It happened when I post something with the phrase "/dev/" or "/etc/"! Rewriting a slash to & #47; solves my problem. (Hmm... so it seems that the Drupal site doesn't suffer from this problem!)

SecFilterEngine Off

I failed to find any proper documentation for this (even from the Apache site), but somehow found that it stands for "Security Filter Engine"... So it's probably better to stick to the changing "/tmp" to "tmp" solution. (Update: just changed my setting to "tmp", the problem STILL PERSISTS!)

phillipadsmith’s picture

Seems to fix the problem on 4.7.5

--
Phillip Smith