JustinMs66@hotmail.com Posted September 29, 2006 Share Posted September 29, 2006 i have a working php upload script, but it only allows about up to 7MB and then it just goes to the error.i want it to NOT have ANY size restriction. but i havn't restricted any sizes!!!!can anyone help me with this!?[code=php:0]<?php//restricting file types i don't want to be uploaded:$bad_types = array('application/octet-stream','application/x-php');//if it's a bad file type, then display error:if( in_array( $_FILES['uploadedfile']['type'], $bad_types ) ){ echo "That File type is not supported.";}else{//otherwise continue on the upload:$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);{ if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "your file HAS been uploaded!"; } else{ echo "There was an error uploading the file, please try again!"; }}}?>[/code] Quote Link to comment Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 There are 2 max size settings to considermax file upload sizemax post size Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 29, 2006 Author Share Posted September 29, 2006 um ok....well i want to set the max size for both very high. like 10GB. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 Both settings are in php.ini. Max post needs to be > max file upload Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 29, 2006 Author Share Posted September 29, 2006 php.ini ??there is no such file... Quote Link to comment Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 There is on my planet Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 29, 2006 Author Share Posted September 29, 2006 where is it!? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 if you call phpinfo() the setting "Configuration File (php.ini) Path " (about 5 lines down) tells you where it's located Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 29, 2006 Author Share Posted September 29, 2006 gotcha. ok i found it. so i need to change "Post" and "File" size? what line of code should i look for to change that? what does it look like? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 Search forupload_max_filesizepost_max_size Quote Link to comment Share on other sites More sharing options...
SharkBait Posted September 29, 2006 Share Posted September 29, 2006 I'm curious, why 10GB upload limit? Does your webhost allow for such a high usage of bandwidth too?Also if you're on a connection like OC48, uploading a file even remotely that large will take a really long time ;)Crazy :) Quote Link to comment Share on other sites More sharing options...
bholbrook Posted September 29, 2006 Share Posted September 29, 2006 Most browsers have a maximum 500MB limit, so anything over that is useless.make sure to put a hidden input named "MAX_UPLOAD_FILESIZE" with the value as the max size in bytes. Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 30, 2006 Author Share Posted September 30, 2006 so how do u increse the upload time? Quote Link to comment Share on other sites More sharing options...
ShibSta Posted September 30, 2006 Share Posted September 30, 2006 Could always use a java applet uploader.Kinda hefty but it would work better than PHP for such a large file 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.