PHP : “UPLOAD_ERR_INI_SIZE error”. When try to run my upload script

Asked By 0 points N/A Posted on -
qa-featured

I have change upload_max_size to 300M while the post_max_size to 600M in php.ini. Now, I have made an upload script and try to upload some files. I've uploaded a file of about 100MB which is lower than my upload_max_size so i thought it would be ok. When I try to upload it i got this error message  "UPLOAD_ERR_INI_SIZE error".

Can anybody tell me what's with this error.

SHARE
Answered By 0 points N/A #86920

PHP : “UPLOAD_ERR_INI_SIZE error”. When try to run my upload script

qa-featured

Hello,

 

To upload larger files, the value of POST_MAX_SIZE must be larger than the upload_max_filesize. If limit of memory is enabled by your configure script, memory_limit also affects the file that is uploading. To be technical memory_limit should be larger than the post_max_size. When an integer value is used then the value is measured in bytes.

 

If the size of post data is greater than the post_max_size, the $_POST and $_FILES superglobalare is empty. This can be tracked in various ways for example by passing the $_GET variable to the script for processing the data, i.e. <form action="edit.php?processed=1">, and then by checking if $_GET[‘processed’] is set.

 

But you also check once that you have changed the required php.ini only. It sometimes happens that you change the other php.ini and then try to upload the file.

 

Thanks.

Related Questions