Problem with board attachment quota (bug?)

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Kryo`
Registered User
Posts: 5
Joined: Thu Dec 03, 2009 4:17 pm

Problem with board attachment quota (bug?)

Post by Kryo` » Thu Dec 03, 2009 4:38 pm

Support Request Template
What version of phpBB are you using? phpBB 3.0.6
What is your board's URL? http://audictiv.online.fr/PhpBB3
Who do you host your board with? http://www.free.fr/
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? No
Is registration required to reproduce this issue? No
What styles do you currently have installed? prosilver
What language(s) is your board currently using? British English
Which database type/version are you using? MySQL 5
What is your level of experience? New to phpBB but not PHP
When did your problem begin? Juste after the installation / configuration of the forum.
Please describe your problem. I can't post a message with an attached .doc file of 1,6Mb: "Sorry, the board attachment quota has been reached."
Even if in my ACP/General/Attachment settings, both Total attachment quota and Maximum file size are set to 0.
Moreover, attaching a .doc file is allowed in my ACP.
Generated by SRT Generator ($Rev: 3396 $)

narqelion
I've Been Banned!
Posts: 7235
Joined: Sat Dec 13, 2008 5:00 pm
Contact:

Re: Problem with board attachment quota (bug?)

Post by narqelion » Mon Dec 07, 2009 5:37 am

Do you get the error message with any attachment file type or just the doc extension?

Kryo`
Registered User
Posts: 5
Joined: Thu Dec 03, 2009 4:17 pm

Re: Problem with board attachment quota (bug?)

Post by Kryo` » Mon Dec 07, 2009 9:23 am

Do you get the error message with any attachment file type or just the doc extension?
I have the error message with any attachment file type :/

Kryo`
Registered User
Posts: 5
Joined: Thu Dec 03, 2009 4:17 pm

Re: Problem with board attachment quota (bug?)

Post by Kryo` » Thu Dec 10, 2009 5:00 pm

up

narqelion
I've Been Banned!
Posts: 7235
Joined: Sat Dec 13, 2008 5:00 pm
Contact:

Re: Problem with board attachment quota (bug?)

Post by narqelion » Thu Dec 10, 2009 5:33 pm

Sorry, someone hijacked your topic and I reported them but by the time their post was split off this topic you dropped way down on my list. :P

There should be two times that error is triggered, and in the first case you are saying that you have the quota disabled in the ACP with a setting of 0 so the only other option is that your server physically does not have the available space to upload the file. What is your free disk space showing on your host?

Kryo`
Registered User
Posts: 5
Joined: Thu Dec 03, 2009 4:17 pm

Re: Problem with board attachment quota (bug?)

Post by Kryo` » Thu Dec 10, 2009 6:49 pm

Well, it is not a problem of free disk space, everything's fine from this aspect.
But I suspect my host to have put a limit of size per tranfsert. That could explain this problem.
I'll try to get more information about that.

But anyway, thanks for your help ;)

narqelion
I've Been Banned!
Posts: 7235
Joined: Sat Dec 13, 2008 5:00 pm
Contact:

Re: Problem with board attachment quota (bug?)

Post by narqelion » Thu Dec 10, 2009 7:14 pm

Well anyway here is the code that checks the quota then returns the error message: (The second free disk space check is where I suspect your problem to be)

Code: Select all

// Check our complete quota
	if ($config['attachment_quota'])
	{
		if ($config['upload_dir_size'] + $file->get('filesize') > $config['attachment_quota'])
		{
			$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
			$filedata['post_attach'] = false;

			$file->remove();

			return $filedata;
		}
	}

	// Check free disk space
	if ($free_space = @disk_free_space($phpbb_root_path . $config['upload_path']))
	{
		if ($free_space <= $file->get('filesize'))
		{
			$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
To be honest, the second check should not return the same error message, the language does not reflect the real issue. There should be a separate language string to indicate that disk space is the issue, especially when there is no quota defined. Good luck. :)

Kryo`
Registered User
Posts: 5
Joined: Thu Dec 03, 2009 4:17 pm

Re: Problem with board attachment quota (bug?)

Post by Kryo` » Thu Dec 10, 2009 7:22 pm

I agree with you, and that's why I don't really know from where the error comes from :roll:

narqelion
I've Been Banned!
Posts: 7235
Joined: Sat Dec 13, 2008 5:00 pm
Contact:

Re: Problem with board attachment quota (bug?)

Post by narqelion » Fri Dec 11, 2009 4:09 am

If you show that code section to your hosts technical support they should be able to quickly identify the problem and resolve it for you. There are only two explanations for the error and you ruled out the first one by disabling the quota in the first place. There is only one logical explanation left. Thank you for posting this problem though, it brought to my attention another language variable that needs to be added and changed to reflect the root cause of the error. :)

Locked

Return to “[3.0.x] Support Forum”