Workaround for heavy upload_max_filesize problems
-
I had big problems with the upload_max_filesize,
i’ve tried edit php.ini, edit .htaccess, adir by ini_set() and edit using wordpress provided funktions… nothing worked.
With a bit of debugging i saw that the apply_filters function used by wp_max_upload_size() from wp-includes/media.php resized teh limit from 32MB to 1MB.
I fixed it by changing
$bytes = apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
to
$bytes = min( $u_bytes, $p_bytes );
and this is working for over a week without problems.I know it is a workaround by changing core code but nothing else worked.
Maybe there is a bug in apply_filters or the upload_size_limit filter+Mail me with outher solutions or questions to [these forums do not provide email support]
- The topic ‘Workaround for heavy upload_max_filesize problems’ is closed to new replies.