anujgarg Posted January 30, 2009 Share Posted January 30, 2009 I want to enable my site to have uploaded files upto max. 2GB. What setting should I make in php.ini or htaccess for this? Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/ Share on other sites More sharing options...
dropfaith Posted January 30, 2009 Share Posted January 30, 2009 2gb is large for a website upload may i ask what your allowing for uploads? In your settings.php file: ini_set('post_max_size', '8M'); ini_set('upload_max_filesize', '8M'); In your .htaccess file: php_value post_max_size 8M php_value upload_max_filesize 8M change 8m to your amount in either case also this should explain it better http://blog.jc21.com/2007-05-03/change-the-maximum-upload-size-with-php/ Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750491 Share on other sites More sharing options...
larsbrimmer Posted January 30, 2009 Share Posted January 30, 2009 Might want to do set_time_limit(0); as well. Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750493 Share on other sites More sharing options...
dropfaith Posted January 30, 2009 Share Posted January 30, 2009 Might want to do set_time_limit(0); as well. good call i hadnt even thought about that Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750494 Share on other sites More sharing options...
anujgarg Posted January 30, 2009 Author Share Posted January 30, 2009 but set_time_limit is used to Limit the maximum execution time....how can it be used in maximum file upload? Please suggest.... Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750555 Share on other sites More sharing options...
larsbrimmer Posted January 30, 2009 Share Posted January 30, 2009 I am not quite sure. All I remember is that I had to change it for an upload script. Just change it to 0 because you might timeout with a 2gb file Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750699 Share on other sites More sharing options...
GingerRobot Posted January 30, 2009 Share Posted January 30, 2009 You do it'd take the average user until, roughly, the second coming to upload a 2gb file, right? Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750803 Share on other sites More sharing options...
premiso Posted January 30, 2009 Share Posted January 30, 2009 You do it'd take the average user until, roughly, the second coming to upload a 2gb file, right? Not with 60mbps Fiber Optic, or a local network. But that also depends on, if non-network, the speeds his server allows The other issue though is browsers tend to timeout after 2-5 minutes of no data being received, which will prematurely kill your script. Quote Link to comment https://forums.phpfreaks.com/topic/143098-file-size-upto-2-gb/#findComment-750809 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.