Plugin Creation: Overriding upload_max_size and post_max_size

First, the setting you want is 'upload_max_filesize', not 'upload_max_size'. Second, both of those settings are PHP_INI_PERDIR, which means they can only be set with php.ini, .htaccess, or httpd.conf. For more information see the PHP documentation on php.ini directives and their configuration.

I would suggest using .htaccess, personally. You might look into writing the information directly to the file from the script, just like WordPress attempts to do for rewrite rules.

EDIT

I just realized that I told you to do it in .htaccess but didn’t tell you how. To set those values in .htaccess add the following lines to the file (anywhere in the file):

php_value upload_max_filesize 100M
php_value post_max_size 105M