tbare Posted December 30, 2007 Share Posted December 30, 2007 hello.. when i try to upload a file larger than, say 3 MB, it seems as though my script times out... it takes a while, so it looks like it's uploading the entire thing, but when it should say "file uploaded successfully" i get "error: no files uploaded" any ideas? <form enctype="multipart/form-data" action="update_humor_video.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="399999999999" /> <input name="category[]" type="radio" value="random" /> - random<br /> <input name="category[]" type="radio" value="whoseline" /> - whoseline<br /> <input name="category[]" type="radio" value="mac_ads" /> - mac_ads<br /> <input name="category[]" type="radio" value="snl" /> - SNL<br /><br /> Please choose a video file:<br /><input name="uploaded_video" type="file" /><br /> Please choose a thumbnail:<br /><input name="uploaded_thumb" type="file" /><br /> <input type="submit" value="Upload" /> </form> Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/ Share on other sites More sharing options...
hitman6003 Posted December 30, 2007 Share Posted December 30, 2007 Even though you are setting MAX_FILE_SIZE to something large enough for your file, php has two settings that will affect the maximum file size: upload_max_filesize and post_max_size. Both of these must also be set large enough to accommodate your file. Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426044 Share on other sites More sharing options...
tbare Posted December 30, 2007 Author Share Posted December 30, 2007 so i would need: <input type="hidden" name="MAX_FILE_SIZE" value="399999999999" /> <input type="hidden" name="POST_MAX_SIZE" value="399999999999" /> ? update: just tried w/ a 3.5 MB file and it didn't work Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426045 Share on other sites More sharing options...
tbare Posted December 30, 2007 Author Share Posted December 30, 2007 do i need to define the MAX_FILE_SIZE and POST_MAX_SIZE on the page that moves the files, as well? Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426050 Share on other sites More sharing options...
hitman6003 Posted December 30, 2007 Share Posted December 30, 2007 php.ini.... http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize http://www.php.net/manual/en/ini.core.php#ini.post-max-size Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426051 Share on other sites More sharing options...
tbare Posted December 31, 2007 Author Share Posted December 31, 2007 is there a way to set these parameters using php? i don't have access to the files.... Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426275 Share on other sites More sharing options...
PFMaBiSmAd Posted December 31, 2007 Share Posted December 31, 2007 They can be set in a .htaccess file (when php is running as an Apache module) or in a local php.ini file(when php is running as a CGI wrapper) provided the web host has allowed them to be changed. Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426278 Share on other sites More sharing options...
hitman6003 Posted December 31, 2007 Share Posted December 31, 2007 You can also try ini_set, although I'm not entirely sure it will work with both directives. Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426671 Share on other sites More sharing options...
PFMaBiSmAd Posted December 31, 2007 Share Posted December 31, 2007 Both of the settings are only settable "PHP_INI_PERDIR" and are not settable in a script. Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426744 Share on other sites More sharing options...
tbare Posted December 31, 2007 Author Share Posted December 31, 2007 ok... so i would have to get a hold of the server admin and have him change the settings since i don't have access? or is there a way around that? i tried http://drupal.org/node/113220 this, but it didn't locate the php.cgi file, so no dice on it... any other ideas? Thanks for all the help, guys! Link to comment https://forums.phpfreaks.com/topic/83736-upload-script-timing-out/#findComment-426748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.