CI 2.0 upload library: memory_limit |
[eluser]Bas Vermeulen[/eluser]
I have a question about the do_xss_clean() function of the upload library. This function starts with checking the current memory limit, adds the file size and updates the memory limit with the new value (old value + file size). File: system/libraries/Upload.php (@ bitbucket) Code: if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != '') My memory_limit is set @ 256mb,which should be much more then enough. But this script doesn't check if their is enough, it always adds the file size and tries to update the memory_limit. Ofc we set a max value, so for every upload our server returns an error: ALERT - script tried to increase memory_limit to 268480769 bytes which is above the allowed value. This is kinda annoying, can someone explain why this function works like this? Is it a bug or is there a special reason for doing it like this? Thanks in advance for your thoughts! |
Messages In This Thread |
CI 2.0 upload library: memory_limit - by El Forum - 12-01-2010, 08:48 AM
CI 2.0 upload library: memory_limit - by El Forum - 12-01-2010, 10:45 AM
CI 2.0 upload library: memory_limit - by El Forum - 12-01-2010, 11:09 AM
CI 2.0 upload library: memory_limit - by El Forum - 12-01-2010, 11:47 AM
CI 2.0 upload library: memory_limit - by El Forum - 12-02-2010, 04:18 AM
|