Reputation: 23
Im using this
ini_set('post_max_size','40M');
echo ini_get('post_max_size');
And for some reason post_max_size is echoing out 8M (the default one) and not 40M. Is the
Upvotes: 2
Views: 1755
Reputation: 382871
The post_max_size
isn't settable at runtime. PHP only runs after the file has been uploaded, you can't use the ini_set
until the upload_max_filesize
has been determined. So, you can't use ini_set
to set the setting for that reason.
You will have to set this option directly from php.ini
.
Upvotes: 4
Reputation: 67745
post_max_size is a INI directive that can be changed PHP_INI_PERDIR only, as stated in the manual.
Again, from the manual:
PHP_INI_PERDIR : Entry can be set in php.ini, .htaccess or httpd.conf
Upvotes: 1