post_max_size not enough …
-
user files is a nice plugin.
But PHP has two settings for limiting form upload. And user files only checks one of them.
In the code for the widget or manage_files_user() (user-files/functions.php) it checks for the file size through
ini_get('post_max_size')
.This is not the limit for a individual file. It’s the limit for the whole form posted (which can hold multiple file upload instances for example). It should check the ini-directive for
upoad_max_filesize
instead.PHP DEFAULTS
post_max_size = 8 MB
upload_max_filesize = 2 MB
One can fix it by commeting out two rows and adding a third:
row 115 in widget.php
// $max_post = (int)(ini_get('post_max_size')); // $MaxSet=1000000*(int)$max_post; $MaxSet = (int)(ini_get('upload_max_filesize')); // no extra math needed since upload_max_filesize is set in MB and not bytes.
(To change it for the short_code option you locate the same variables on row 463 in functions.php.)
- The topic ‘post_max_size not enough …’ is closed to new replies.