B0b Posted January 9, 2010 Share Posted January 9, 2010 Hey guys! I'm trying to upload a file, it works well with smaller files but with 60mb+, I get a POST size error even though I've raised POST max size: ini_set( 'post_max_size', '500M' ); This error is saved as an error log: [09-Jan-2010 22:58:16] PHP Warning: POST Content-Length of 64635880 bytes exceeds the limit of 16777216 bytes in Unknown on line 0 In "Unknown"? Haha! Wooo! Where am I supposed to look for? I guess I should raise POST limit directly in php.ini then? Thanks for the advises! Quote Link to comment https://forums.phpfreaks.com/topic/187884-big-file-upload/ Share on other sites More sharing options...
teamatomic Posted January 9, 2010 Share Posted January 9, 2010 post_max_size You can also use .htaccess php_value upload_max_filesize 100M php_value post_max_size 100M if you still have problems you will have to increase the memory available to php php_value memory_limit Theoretically it should be larger that the file you are posting...but you probably dont have that much in the server. YMMV. HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/187884-big-file-upload/#findComment-991975 Share on other sites More sharing options...
JAY6390 Posted January 9, 2010 Share Posted January 9, 2010 it could also be that your host doesn't allow the size to be changed Quote Link to comment https://forums.phpfreaks.com/topic/187884-big-file-upload/#findComment-991995 Share on other sites More sharing options...
B0b Posted January 9, 2010 Author Share Posted January 9, 2010 Nope, it's a dedicated server... Well, it seems like I'm having an hard time getting a .htaccess file on there. Whether I create it from an FTP client, upload it from an FTP client, create it from cPanel or upload it from cPanel... the file doesn't appear? EDIT: HohOH? What is that?: <?php ini_set( 'upload_max_filesize', '500M' ); ini_set( 'post_max_size', '500M' ); ini_set( 'memory_limit', '500M' ); phpinfo(); post_max_size and upload_max_filesize haven't changed, memory_limit did however? Quote Link to comment https://forums.phpfreaks.com/topic/187884-big-file-upload/#findComment-991999 Share on other sites More sharing options...
PFMaBiSmAd Posted January 9, 2010 Share Posted January 9, 2010 You cannot use an ini_set() in your script for the upload size settings because the settings are used by php before your script is ever executed (which is why the error message reports that error is occurring in Unknown on line 0.) If you have a dedicated server, why not make the change in the master php.ini? The leading dot in the .htaccess file name is there to make it so that you cannot normally see the file. Also, you can only put php settings in to a .htaccess file when php is running as an Apache Module. If php is running as a CGI application, you would need to use a local php.ini. If php is running as anything else then these two combinations, you must use the master php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/187884-big-file-upload/#findComment-992003 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.