Alternative methods to change maximum file upload ini settings?
| From: | Jacob Kruger | Date: | Tue, 01 Sep 2015 20:48:16 +0000 |
| Subject: | Alternative methods to change maximum file upload ini settings? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-31358@lists.php.net to get a copy of this message | ||
While am trying to use ini_set at the top of my script to change both
upload_max_filesize: 2M
post_max_size: 8M
They seem to refuse to implement the changes - those are the values it's pulling out using
ini_get() function both before, and after the call of the ini_set() function, and have tried both
integer byte values, and short-hand values using the M suffix/unit, to set it to 20Mb?
Am also implementing the hidden field to try work with this as well:
<input type="hidden" name="MAX_FILE_SIZE" value="21474836480" />
And, that's the very first field inside the <form /> tags, but, this just doesn't
seem to want to cooperate - files smaller than the default values seem quite happy/comfortable to be
uploaded, but, any file larger than that just includes error integer 1 inside the
$_FILES["fil_field"] array/collection, which equates to an error relating to
UPLOAD_ERR_INI_SIZE.
Now, can edit php.ini on my windows dev machine to change/hard-code those values, but won't
necessarily help in production environments, and really just not sure why this is not prepared to
cooperate with ini_set, etc. - working under XAMPP, implementing PHP 5.5.11, running under apache
2.4.9, and, for example, if I try this on a production, debian box, with similar version numbers,
then same behaviour?
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."