[email protected] 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] Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/ 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 Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101093 Share on other sites More sharing options...
[email protected] 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. Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101095 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 Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101096 Share on other sites More sharing options...
[email protected] Posted September 29, 2006 Author Share Posted September 29, 2006 php.ini ??there is no such file... Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101097 Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 There is on my planet Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101100 Share on other sites More sharing options...
[email protected] Posted September 29, 2006 Author Share Posted September 29, 2006 where is it!? Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101101 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 Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101102 Share on other sites More sharing options...
[email protected] 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? Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101104 Share on other sites More sharing options...
Barand Posted September 29, 2006 Share Posted September 29, 2006 Search forupload_max_filesizepost_max_size Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101106 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 :) Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101112 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. Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101128 Share on other sites More sharing options...
[email protected] Posted September 30, 2006 Author Share Posted September 30, 2006 so how do u increse the upload time? Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101221 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 Link to comment https://forums.phpfreaks.com/topic/22535-upload-script-no-size-restriction/#findComment-101228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.