Page 1 of 1

406 error with attachments over 10MB

Posted: Sat Feb 11, 2012 12:49 am
by turbomkt
Support Request Template
What version of phpBB are you using? phpBB 3.0.11
What is your board's URL? available upon request
Who do you host your board with? MidPhase
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
What version of phpBB3 did you update from? phpBB 3.0.9
What styles do you currently have installed? Prosilver and Subsilver
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue? available upon request
What password can be used to view this issue? available upon request
When did your problem begin? This began in the last few weeks. I updated to the latest version (3.0.10) to see if it would help, but there was no change. Tried adding to .htaccess to see if it made a difference, and there was none. Host wants more information before they will make changes to mod_sec. With smaller attachments working, I'm not sure it's a mod_sec issue.
Please describe your problem. When uploading some attachments (over 10MB) received 406 error:
Not Acceptable

An appropriate representation of the requested resource /posting.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.
Generated by SRT Generator

Edited to updated phpBB version to 3.0.11.

Re: 406 error with attachments over 10MB

Posted: Sat Feb 11, 2012 2:00 am
by Oyabun1
I'd suggest giving your host the information they requested. 406 errors are usually to do with server setup and nothing to do with phpBB.

Re: 406 error with attachments over 10MB

Posted: Sat Feb 11, 2012 2:30 am
by turbomkt
Could it really still be a server side issue when smaller attachments work? In testing I was able to post .2, 2, 3, 6, 7 and 10MB files of various types. It's not until it gets bigger that it does not work.

ETA: Thanks for the look and any help I get.

Re: 406 error with attachments over 10MB

Posted: Sat Feb 11, 2012 4:18 am
by femu
As Oyabun1 said. Talk with your provider. A lot of providers restrict file sizes, when uploading through http. Alternativly you can try to upload a bigger file via FTP

Re: 406 error with attachments over 10MB

Posted: Sun Sep 16, 2012 9:04 pm
by turbomkt
Thanks to work and other things, I haven't been able to give this problem the attention it deserves. The last thing the host sysadmin has done is add a line to .htaccess to give my php.ini precedence over all others.

Which variables are most likely to cause problems?

Code: Select all

max_execution_time = 600
max_input_time = 600	
default_socket_timeout = 600

Re: 406 error with attachments over 10MB

Posted: Sun Sep 16, 2012 10:56 pm
by DionDesigns
Go to your ACP and click the "PHP Information" link on the left. Now find the block labeled "Core", and let us know the Local Value and Master Value for upload_max_filesize and post_max_size.

Re: 406 error with attachments over 10MB

Posted: Sun Sep 16, 2012 11:01 pm
by turbomkt
These shouldn't be a problem, I think.

Code: Select all

post_max_size	1024M
upload_max_filesize	1024M

Re: 406 error with attachments over 10MB

Posted: Sun Sep 16, 2012 11:33 pm
by Lumpy Burgertushie
that is 1 gb I have never seen a host setting that high.

also, quite often the setting you can see is not the only one there is.

so, contact your host and ask them about this. it is their server and they have control over the settings.

robert

Re: 406 error with attachments over 10MB

Posted: Sun Sep 16, 2012 11:37 pm
by turbomkt
Thanks. They claim to have added code to .htaccess that has my php.ini override any others. I'm also continuing to push back on them to figure this out. It worked, then it didn't. I hadn't changed anything at that point.

Re: 406 error with attachments over 10MB

Posted: Mon Sep 17, 2012 4:33 pm
by pacificfils
Ok. Finally something I can explain.

A 406 means that the file is too large. What PHP and .htaccess report are COMPLETELY different. Many times, a host puts a restriction on the bandwith, usually 2 MB, 5 MB, or 10 MB. Many hosts do this so they are not flooded with data.

Either get a better plan with larger bandwidth, (GoDaddy doesn't as far as I know, give out 1GB uploads.)
or host your own server and set your own bandwidth size.

----

If you are the one trying to upload this file, try to put it using FTP in the store/ folder and link to it, so people can download.

If someone else is trying to upload this file, try to get the file from them, or give them an FTP account to upload. DELETE THE ACCOUNT WHEN THE USER IS DONE! Tell them to link to the file.

Good luck!

Re: 406 error with attachments over 10MB

Posted: Mon Sep 17, 2012 5:36 pm
by Oleg
Check your web server error logs for why it sent a 406.

phpbb does not use that status code. It's something that the web server does on its own initiative. You should ask your host why this is happening.