Forumlar / Cotonti / Support / PFS Max filesize limit Question

ez
#1 2010-03-16 03:35
I know that I can set the maximum filesize for a single file in the groups...

But is there a limit or so...??
It is now 2048, and i want to change it to 2500, but it doesn't 'remember' my new setting ?

Am I doing something wrong ?
==- I say: Keep it EZ -==
GHengeveld
#2 2010-03-16 22:57
Depends on server settings, in my case max is 8120kb or so.
You could try editing directly in the DB, just to be sure.
If your admin panel changes don't get saved you should purge the internal cache (admin->other->cache).
ez
#3 2010-03-16 23:51
THNX Koradhil...
Will try that..

I looked into the code:
'upload_max_filesize', 'post_max_size', 'memory_limit'
Were are these settings normaly made ?

I do not see them in config.php :/

Also there could be a maximum in php.ini? (but I am on a shared server... how can I see this setting in a easy way ???)

Added 5 minutes later:

Hmmmm koradhil.. I tried that... I cleared the cache (No luck).
==- I say: Keep it EZ -==

Bu konu ez tarafından düzenlendi(2010-03-16 23:56, 14 yıllar önce)
foxhound
#4 2010-03-17 00:10
I have the same issue as above.
On my Cotonti website I can not change the "PFS max size for a single file (KB) :".
I am running a Cotonti site in development and a live running Seditio site on the same server. On the Sedito site I can set it to 8000 without issues (did not try higher). But on the Cotonti site I can not increase that size for any user.
I can set it lower though (so it saves the settings, but I did clean the cache as well just to be sure).
When you set it lower you can increase it again, but never higher than the initial value.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
ez
#5 2010-03-17 02:33
this could be an issue ????
foxhound: Welke provider gebruik je ? (Zeker XS4ALL)

I found where MY problem is coming from:

To test your server settings make a php file with this code and run it
echo 'post_max_size = ' . ini_get('post_max_size') . "<br />n";
echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . "<br />";
echo 'post_max_size in bytes = ' . return_bytes(ini_get('post_max_size')). "<br />";
echo 'upload_max_filesize = ' . ini_get('upload_max_filesize') . "<br />";
echo 'memory_limit = ' . ini_get('memory_limit') . "<br />";

function return_bytes($val) {
    $val = trim($val);
    $last = strtolower($val[strlen($val)-1]);
    switch($last) {
        // The 'G' modifier is available since PHP 5.1.0
        case 'g':
            $val *= 1024;
        case 'm':
            $val *= 1024;
        case 'k':
            $val *= 1024;
    }
   return $val;
}

This was my output:
post_max_size = 8M
npost_max_size+1 = 9
post_max_size in bytes = 8388608
upload_max_filesize = 2M
memory_limit = 128M

And that is where my problem is....
In functions.php there is a function sed_get_uploadmax() that gets some off these vars.
In this case the upload_max_filesize

IS THE CHECK FOR upload_max_filesize REALLY NEEDED ??? OR CAN I DISABLE IT
Because there is a post_max_size size !
==- I say: Keep it EZ -==

Bu konu ez tarafından düzenlendi(2010-03-17 04:02, 14 yıllar önce)
Trustmaster
#6 2010-03-17 05:24
Yes, this check is really needed, PHP won't upload files bigger than upload_max_filesize. Even if you change that limit for your users in CMS (like in Seditio), it makes no sense if PHP does not allow such uploads - the upload will just fail.
May the Source be with you!
ez
#7 2010-03-17 05:40
Thnx Trustmaster,

I will ask my provider if they can raise that setting....
==- I say: Keep it EZ -==
GHengeveld
#8 2010-03-17 09:28
Try this:
ini_set('upload_max_filesize', '8M'); 
This will change the value so you don't have to contact the host. You'll have to do this every time, so I suggest putting it in system/common.php (or make a plugin for it with a global hook).
Trustmaster
#9 2010-03-17 15:05
ini_set() is disabled on many hosts
May the Source be with you!
foxhound
#10 2010-03-18 21:04
# foxhound : On my Cotonti website I can not change the "PFS max size for a single file (KB) :".
I am running a Cotonti site in development and a live running Seditio site on the same server. On the Sedito site I can set it to 8000 without issues (did not try higher).


I have to correct myself.
The difference is with Seditio you can set the value to whatever, but its still limitted by the upload_max_filesize as set by the server.
With Cotonti the limit for filesize will just be equal to the server setting, thats why i could not change it.

I tested it and I found out although I had bigger files allowed for admin we still were not able to upload big files, due to the server set to max 2MB.........sorry for at first confirming something which was no bug after all O:-)
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />