Post file size stuck at 8MB ?

gypsumwolf

Joined: 2012-05-05
Posts: 1
Posted: Sat, 2012-05-05 12:43

I have Ubuntu Server installed and gallery 3.3 and drupal 7.x.

I changed the php.ini in /etc/php5/apache2/php.ini AND /etc/php5/cli/php.ini to allow 32MB, but Gallery says there is an 8MB file size limit.

Yes, I did restart apache.

Snip from php.ini

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 32M

snip of post_max_size from php.ini

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 32M

Snip File uploads from php.ini

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 32M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 25
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2012-05-06 01:06

GD as your toolkit?
this is how we calculate that if using GD:

  /**
   * Return the max file size that this graphics toolkit can handle.
   */
  static function max_filesize() {
    if (module::get_var("gallery", "graphics_toolkit") == "gd") {
      $memory_limit = trim(ini_get("memory_limit"));
      $memory_limit_bytes = num::convert_to_bytes($memory_limit);

      // GD expands images in memory and uses 4 bytes of RAM for every byte
      // in the file.
      $max_filesize = $memory_limit_bytes / 4;
      $max_filesize_human_readable = num::convert_to_human_readable($max_filesize);
      return array($max_filesize, $max_filesize_human_readable);
    }

    // Some arbitrarily large size
    return array(1000000000, "1G");
  }

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team