<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
    <title><?= $_SERVER['SERVER_NAME'?></title>
    <style type="text/css">
      <!-- 
    a {color:#6699cc;text-decoration: none;}
    a:hover {color:#333333;text-decoration: none;}
    body{margin-top:5em;background:#f2f2f2;color:#666666;font: 11px/120% Verdana, Arial, 
sans-serif;text-align:center;}
    h1,h2,h3{font-size:1.2em; text-align:left;color: #333333;}
    h1{padding:1em 0;margin:0;}
    p, td, th, blockquote, li, dt, dd {margin: 0;padding: 0 0 1em 0;font-size: 1em;}
    p.columns{float:left;margin:0;padding:0;width:16em;display:block;text-align:left;text-transform:lowercase;}
    .clear{clear:both;margin:0;padding:0;}
    #boxin{padding:0 1em;margin:0;width:auto;background:#f9f9f9;text-align:left;}
    #boxout{margin:0 auto;padding:1px;width:50em;background:#ffffff;border:1px solid #e5e5e5;}
    -->
    </style>
</head>
<body>
<div id="boxout"><div id="boxin">
  <h1>Why can't I upload big files (over a megabyte or two)?</h1>
  Craig Goranson wrote <a href="http://marc.theaimsgroup.com/?l=gallery-users&m=102589601604892&w=2">a very informative email</a> about how to fix this issue.<br />
  <br />
  The upload_max_filesize and post_max_size directives can be overridden in an .htaccess file. This means that changing the setting globally may still result in it being overridden at the .htaccess level, so you may want to just change the directive there instead of globally. Gallery tries to set both of the directives to about 20 megabytes, so this will only affect you if you're going to upload files over that size.<br />
  <br />
  If you're using Apache 2, especially with something like RedHat, you may need to edit another directive, LimitRequestBody, as described <a href="http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=7419">in this forum post</a>. Setting this directive to 0 (i.e. LimitRequestBody 0) will allow you to upload as big a file as you want (until you hit upload_max_filesize and/or post_max_size -- see the above email link for more information).<br />
  <h1>upload_max_filesize and post_max_size</h1>
  Files are usually POSTed to the webserver in a format known as 'multipart/form-data'. The post_max_size sets the upper limit on the amount of data that a script can accept in this manner. Ideally this value should be larger than the value that you set for upload_max_filesize. <br />
  <br />
  It's important to realize that upload_max_filesize is the sum of the sizes of all the files that you are uploading. post_max_size is the upload_max_filesize plus the sum of the lengths of all the other fields in the form plus any mime headers that the encoder might include. Since these fields are typically small you can often approximate the upload max size to the post max size.<br />
  <br />
  According to the PHP documentation you can set a MAX_UPLOAD_LIMIT in your HTML form to suggest a limit to the browser. Our understanding is that browsers totally ignore this directive.
  <h1>memory_limit</h1>
  When the PHP engine is handling an incoming POST it needs to keep some of the incoming data in memory. This directive has any effect only if you have used the --enable-memory-limit option at configuration time. Setting too high a value can be very dangerous because if several uploads are being handled concurrently all available memory will be used up and other unrelated scripts that consume a lot of memory might effect the whole server as well.<br />
  <h1>max_execution_time and max_input_time</h1>
  These settings define the maximum life time of the script and the time that the script should spend in accepting input. If several mega bytes of data are being transfered max_input_time should be reasonably high. You can override the setting in the ini file for max_input_time by calling the set_time_limit() function in your scripts.<br />
  <h1>Apache Settings</h1>
  The apache webserver has a LimitRequestBody configuration directive that restricts the size of all POST data regardless of the web scripting language in use. Some RPM installations sets limit request body to 512Kb. You will need to change this to a larger value or remove the entry altogether.<br />
  <br />
</div></div>
</body>
</html>