will_jones Posted June 7, 2009 Share Posted June 7, 2009 I am building a site where users can upload mp3 files. Certain mp3 files will not upload. I can get it to work for some but not others. Any ideas why this is. I don't think its a protected mp3 issue as i checked that but using the below code, some files display their attributes and some don't. The code simplified.... echo ' <form enctype="multipart/form-data" action="" method=post> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> <input name="userfile" type="file"> <input type="submit" value="upload tune"> </form>'; echo $_FILES["userfile"]["name"]; echo $_FILES["userfile"]["type"]; echo $_FILES["userfile"]["size"]; Anybody come across similar problems ???? Quote Link to comment https://forums.phpfreaks.com/topic/161298-file-upload-issue/ Share on other sites More sharing options...
Adam Posted June 7, 2009 Share Posted June 7, 2009 The default maximum file size for uploads is about 5MB; which is probably the reason why only some are failling. You are using the "MAX_FILE_SIZE" HTML attribute but this isn't always guaranteed to work. Take a look at this; has some suggestions on how to increase your max. file upload size. Quote Link to comment https://forums.phpfreaks.com/topic/161298-file-upload-issue/#findComment-851150 Share on other sites More sharing options...
will_jones Posted June 7, 2009 Author Share Posted June 7, 2009 cheers Turns out i was changing the max file size in the wrong php.ini file. I use wamp server and there are two ini files. The one that i should of been changing was in the apache folder. Quote Link to comment https://forums.phpfreaks.com/topic/161298-file-upload-issue/#findComment-851220 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.