Upload Large Files Via Post

liunx

Guest
Hi I'm trying to upload large files, around 20 Mb, but so far I have only been able to upload files up to 8 Mb, I made the following modifications in the <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->.htaccess <!--fontc--></span><!--/fontc-->file:<br /><br /><blockquote>php_value upload_max_filesize 20M<br />php_value post_max_size 20M<br />php_value max_execution_time 200<br />php_value max_input_time 200</blockquote><br /><br />I'm getting a 413 error message with the following text:<br /><br /><blockquote>Request Entity Too Large<br />The requested resource<br />/upload.php<br />does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.</blockquote><br /><br />What can I do? FTP files is not an option, any suggestions?<!--content-->
According to this: <br /><br /><i><blockquote>"All the configuration settings for your PHP installation are contained in the php.ini file. Sometimes these setting might be overridden by directives in apache .htaccess files or even with in the scripts themselves. However you cannot override the settings that affect file uploads with .htaccess directives or inside scripts in this way."</blockquote></i><br /><br />So it looks I'm stuck with the max post size, which is 8Mb. <br /><br />I'm thinking this setting only applies for PHP, what about Perl? Has someone tried to upload files bigger than 8 megs using a CGI on TCH?<!--content-->
You could try adding "<b>php_value memory_limit 20M</b>" and see if that fixes your problem.<!--content-->
I have been modifying the htaccess file:<br /><br /><blockquote>php_value upload_max_filesize 20M<br />php_value post_max_size 20M<br />php_value memory_limit 40M<br />php_value max_input_time 2400<br />php_value max_execution_time 2400</blockquote><br /><br />Still no success. Any other suggestion? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/helpsmilie.gif" style="vertical-align:middle" emoid=":helpsmilie:" border="0" alt="helpsmilie.gif" /> <br /><br /><br /><!--content-->
Is your .htaccess located in the root of where you need the changes? (in your case it would appear to be your filedepot directory if I'm looking at the right site)<br /><br />You could try putting a file in the directory your upload script resides that has "<?php phpinfo(); ?>" in it and check that your settings are taking effect properly.<br /><br />I am also noticing your form has this in it:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->                                <div id="input_boxes"><br />                                    <input type="hidden" name="MAX_FILE_SIZE" value="2621440" /><br />                                    <input type=file name=fileup_0 size="70"><br />                                </div><!--c2--></div><!--ec2--><br /><br />Without knowing your upload.php code though I don't know what affect that has.<!--content-->
Yes, you are looking at the right site. The htaccess file is located on the root directory for that subdomain, I have already tried the phpinfo() page to gather info.<br /><br />The limit on the HTML code is not being enforced on the upload page. <br /><br />I haven't got the chance to work on this today. But I hope I'm able to do some more tests later today...<!--content-->
Ok, I did some quick tests. You are right about this it was only 2.5 Mb, that was one of my last additions yesterday <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/blush.gif" style="vertical-align:middle" emoid=":blush:" border="0" alt="blush.gif" /> , anyway, I've modified that parameter to 20 Mb but I'm still hitting the 8 Mb limit imposed by the ini file <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wallbash.gif" style="vertical-align:middle" emoid=":wallbash:" border="0" alt="wallbash.gif" /> .<br /><br />I think I didn't mentioned this before, but I have already tried the phpinfo() page to gather info, that's how I learned the 8Mb defined on php.ini file.<br /><br />Anyway, perhaps I will have to implement the upload mechanism via CGI ... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/dry.gif" style="vertical-align:middle" emoid="<_<" border="0" alt="dry.gif" /> <br /><br />any other idea before dropping PHP on this part? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/helpsmilie.gif" style="vertical-align:middle" emoid=":helpsmilie:" border="0" alt="helpsmilie.gif" /><!--content-->
I forgot to mention that the line memory limit is already on the htaccess. I did after I posted.<br /><br />Right now is like this:<br /><br />php_value memory_limit 40M<br /><br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/helpsmilie.gif" style="vertical-align:middle" emoid=":helpsmilie:" border="0" alt="helpsmilie.gif" /><!--content-->
 
Top