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.

Login/Register to Answer

Related Questions