andz Posted July 8, 2009 Share Posted July 8, 2009 when uploading a file, i've encountered a problem ... here's the dump values Array ( [userfile] => Array ( [name] => beach_iStock_000000112348_L2.jpg [type] => [tmp_name] => [error] => 2 => 0 ) ) i already have set up the necessary things when uploading larger files... my limit is 10mb of file upload. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2009 Share Posted July 8, 2009 The error you are getting - UPLOAD_ERR_FORM_SIZE Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form. Your form contains a line that is telling php to limit the size of the file. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871275 Share on other sites More sharing options...
andz Posted July 8, 2009 Author Share Posted July 8, 2009 that's right ... is there any way to solve this? i already have setup on the php.ini and also included MAX SIZE on html ... that will accept file of 10mb of size. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871278 Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2009 Share Posted July 8, 2009 Post your form if you want someone to help with what it is doing wrong. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871286 Share on other sites More sharing options...
andz Posted July 8, 2009 Author Share Posted July 8, 2009 <HTML> <HEAD> <TITLE>Upload example</TITLE> </HEAD> <BODY> <FORM METHOD="post" ACTION="page.php" enctype="multipart/form-data"> <p><strong>File</strong><br> <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="30000" /> <INPUT TYPE="file" NAME="attach" SIZE="30"></p> <P><INPUT TYPE="submit" NAME="submit" VALUE="Send"></p> </FORM> </BODY> </HTML> that's my form. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871300 Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2009 Share Posted July 8, 2009 <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="30000" /> 30000 = 30,000 bytes Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871320 Share on other sites More sharing options...
andz Posted July 8, 2009 Author Share Posted July 8, 2009 yes, that's correct. i just reduce the size of the MAX_FILE_SIZE but still having problem.... the only file limit the server accepted is only bloe 1mb of file. Link to comment https://forums.phpfreaks.com/topic/165223-problem-with-upload/#findComment-871341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.