Trouble with user quota and file size limit Trouble with user quota and file size limit
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Trouble with user quota and file size limit

Started by MrMastah, March 04, 2007, 11:57:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrMastah

Hi!
I think I have a problem with the permissions. All my users can make user galleries and create their own albums and I've set the quota for registered users to 2048 KB. Then I made a category for video uploads and albums in that category where I allow users of the registered group to upload videofiles (since these often are bigger than their allowed quota) and only limiting the uploads by filesize, max 20480 kB (20 MB), in config. I've noticed that users can upload how many files they want as long as the files are smaller than their quota so total amount of the uploaded files can exceed the 2048 KB qouta BUT when a user tries to upload one file that is bigger that 2048 KB (the quota), lets say 4000 KB, this message shows up:
QuoteDisk quota exceeded
You have a space quota of 2048K, your files currently use 0K, adding this file would make you exceed your quota.

That can't be right since the file size limit is set to 20 MB?

I want the permission I set for the quota to apply ONLY to their own user galleries, NOT to those albums where registered users are allowed to upload! Only the file size limit set in config should apply there! How can I make this work?

Hopefully someone can help me out!  ::)

MrMastah

Well i maybe have to mention I've read all topics that I could find about setting permissions and uploading on the forum (like this one: http://forum.coppermine-gallery.net/index.php?topic=24088.0) and FAQ (http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#uploadGeneralTroubleshooting). I run my own Apache webserver with PHP 5 on a Windows machine with the help of XAMPP for Windows. My settings in php.ini are:

max_execution_time = 240
max_input_time = 480
memory_limit = 128M
upload_max_filesize = 128M
post_max_size = 128M

I wont post a link to the gallery since it's on an development server, but if you think you can help me I could PM you a working temp link (if you need one)...

Please, can anyone help me?  ???

Nibbler

include/picmgmt.inc.php

find


// Test if disk quota exceeded
if (!GALLERY_ADMIN_MODE && $USER_DATA['group_quota']) {


change to


// Test if disk quota exceeded
if (!GALLERY_ADMIN_MODE && $USER_DATA['group_quota'] && $category == FIRST_USER_CAT + USER_ID) {

MrMastah

Thank you Nibbler! Now it works as I want it to work!  ;D  :D