AncientSage Posted July 7, 2006 Share Posted July 7, 2006 I have a file upload script, the php works perfectly, and the HTML part of it can upload small files without problem, but when it comes time to upload a file such as an Mp3, it is not getting it (as the php is executing as it should). The HTML script is as follows...[code]<form action="{FORM_ACTION}" method="post" enctype="multipart/form-data"><input type="file" name="ufile"><input type="hidden" name="MAX_FILE_SIZE" value="1000000"><br><input type="submit" value="Upload"></form>[/code]Thanks for any help...Note: Ignore {FORM_ACTION}, it's defined in php. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 7, 2006 Share Posted July 7, 2006 Chances are that the MP3 file exceeds 1000000 bytes (0.95 mb). Either change the value of the hidden field MAX_FILE_VALUE or completely remove it. Quote Link to comment Share on other sites More sharing options...
AncientSage Posted July 7, 2006 Author Share Posted July 7, 2006 Whoops, that might've been my problem, 'cept I've upped the value and removed it, yet it still doesn't work. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 8, 2006 Share Posted July 8, 2006 There is also a setting in php.ini called 'upload_max_filesize'. It's default value is '2M'. You can change it by running the following command in your upgrade script:[code]ini_set('upload_max_filesize','whatever size you want');[/code] Quote Link to comment Share on other sites More sharing options...
Gast Posted July 9, 2006 Share Posted July 9, 2006 [quote author=Daniel0 link=topic=99746.msg393514#msg393514 date=1152361150]There is also a setting in php.ini called 'upload_max_filesize'. It's default value is '2M'. You can change it by running the following command in your upgrade script:[code]ini_set('upload_max_filesize','whatever size you want');[/code][/quote]Also, check the POST_MAX_SIZE which is similar to the above. It needs to be roughly the same as UPLOAD_MAX_FILESIZE. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.