stephenk Posted May 6, 2006 Share Posted May 6, 2006 I have made a little file upload script for images and was wondering if apache imposes some sort of upload size limit? It seems to be about 1.5mb. The script is for a client to add new pictures to the website, but I'm using GD to resize them, and so I would ideally like to be able to upload 5mb images (from digital camera).Thanks for any help,Stephen Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/ Share on other sites More sharing options...
litebearer Posted May 6, 2006 Share Posted May 6, 2006 Generally the default upload file size is 2mb. This can sometimes be changed in your php.ini file (if your host allows it).try running the phpinfo() on your host. then look for upload_max_filesizeLite... Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/#findComment-33833 Share on other sites More sharing options...
stephenk Posted May 6, 2006 Author Share Posted May 6, 2006 ah ha!Thanks very much for that. Im now using .htaccess to force it up to 5M.CheersStephen Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/#findComment-33856 Share on other sites More sharing options...
corillo181 Posted May 6, 2006 Share Posted May 6, 2006 mine allowes 50mbbut when using uploa dform i know you gotta put a hidden field and give it a maxfile size allowed, but how do i know how muhc is 1mb if you have to give the file size in k. is there any where i can go that i cna calculate how many k or mb or what = whattever.. so when i want to give one specifict size i know what i'm doing.. Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/#findComment-33862 Share on other sites More sharing options...
stephenk Posted June 4, 2006 Author Share Posted June 4, 2006 Use google, search for:5mb in kbor similar.Stephen Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/#findComment-41675 Share on other sites More sharing options...
poirot Posted June 4, 2006 Share Posted June 4, 2006 You can't change upload_max_size on runtime, but you can check the size of an uploaded file. Something like this:[code]if ($_FILES['file']['size'] >(1024 * 1024)) { echo 'File bigger than 1 MB!';}[/code]1024 bytes = 1 KB1024 KB = 1 MB1024 MB = 1 GB... Quote Link to comment https://forums.phpfreaks.com/topic/9181-upload-script-file-size-limit/#findComment-41729 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.