dsjoes Posted July 26, 2011 Share Posted July 26, 2011 i have an upload form that lets me upload files but when i try to upload a file 116mb i get a 500 error. i have changed the following in the php.ini but it still does it. upload_max_filesize = 150M post_max_size = 150M memory_limit = 150M <?php if(isset($_FILES['upload'])){ $target = "uploads/".basename($_FILES['upload']['name']) ; print_r($_FILES); if(move_uploaded_file($_FILES['upload']['tmp_name'],$target)) echo "OK!"; } else{ } ?> Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/ Share on other sites More sharing options...
requinix Posted July 26, 2011 Share Posted July 26, 2011 And what do the server logs say about that error? Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247546 Share on other sites More sharing options...
IrOnMaSk Posted July 26, 2011 Share Posted July 26, 2011 uploading large file like that, your post_max_size has to be bigger that your upload_max_filesize and if you have memory_limit enable it has to be bigger than post_max_size try that.... Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247559 Share on other sites More sharing options...
dsjoes Posted July 27, 2011 Author Share Posted July 27, 2011 I have looked through the log files but there are none to do with the upload script errors and none are from around the the time i got the error. I have tryed changing them to the below but it is still the same post_max_size = 450M memory_limit = 900M upload_max_filesize = 150M Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247891 Share on other sites More sharing options...
PFMaBiSmAd Posted July 27, 2011 Share Posted July 27, 2011 What does a .php script with a phpinfo statement in it show for those settings? Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247898 Share on other sites More sharing options...
dsjoes Posted July 27, 2011 Author Share Posted July 27, 2011 yes they are showing what they are set at Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247908 Share on other sites More sharing options...
PFMaBiSmAd Posted July 27, 2011 Share Posted July 27, 2011 What does adding the following three lines of code, immediately after the first opening <?php tag, show - ini_set("display_startup_errors", "1"); ini_set("display_errors", "1"); error_reporting(-1); Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1247947 Share on other sites More sharing options...
dsjoes Posted July 27, 2011 Author Share Posted July 27, 2011 it shows nothing it just goes to the 500error after trying to upload Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1248044 Share on other sites More sharing options...
IrOnMaSk Posted July 27, 2011 Share Posted July 27, 2011 So you doing this just using your localhost server or you using a webhost server online? Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1248054 Share on other sites More sharing options...
dsjoes Posted July 27, 2011 Author Share Posted July 27, 2011 webhost online Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1248065 Share on other sites More sharing options...
IrOnMaSk Posted July 27, 2011 Share Posted July 27, 2011 I would assume that it has to be done from both ends, when you upload into someone else's directory won't that someone has to update your profile or account telling the system to accept the large file coming in? just throwing idea Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1248077 Share on other sites More sharing options...
xyph Posted July 27, 2011 Share Posted July 27, 2011 Talk to your host. They may not allow PHP to use that much memory. This is pretty much a server issue, not a PHP problem, assuming you've done everything suggested. Quote Link to comment https://forums.phpfreaks.com/topic/242882-upload-of-large-file-help/#findComment-1248121 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.