34M max per file limit

preminik

Joined: 2011-08-31
Posts: 4
Posted: Wed, 2011-08-31 04:51

Hi,

For some reason Gallery3 doesn't allow me to upload more than 34Mb files.

The setup is on an internal debian server with php5.

php.ini set to max_file_size of 150M and max_post_size of 200M

is there anythyng else I need to modify to remove the limit.

Thanks with regards,
Preminik

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-08-31 04:55

Does the server add method work? Uploading 34Mb files via a 'post' is a bit much for any browser.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
preminik

Joined: 2011-08-31
Posts: 4
Posted: Wed, 2011-08-31 04:59

Thanks for the quick reply Dave,

I haven't tried the server add method yet.

As it is an internal server the loading is not a problem,
upto 34M (video) files uploaded within seconds without any issues.

Even if the server add method works I would be more interested to see why the usual upload method doesn't show the maximum upload limit as per php.ini

Regards,
preminik

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-08-31 18:55

Calculation are done in modules/gallery/helpers/graphics.php

  /**
   * 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);
    }

perhaps you are using GD?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
preminik

Joined: 2011-08-31
Posts: 4
Posted: Wed, 2011-08-31 23:01

Dave,

It is very interesting, last night I purged Apache and PHP and reinstall to see any different with default config files. But same thing again.

Then I installed a new gallery3 (/var/www/gallery4), it worked flawlessly (with new db). then I move the databse.php and album folder to see how that work and it the same thing again.

So something wrong with either the db or album folder.

As I mentioned it is only a local (home) server, so I decided to install a new gallery3 (/var/www/gal/gallery3) and did a server side upload from previous album folder.

I couldn't finish off all setup yet but so far it seems OK. Now it shows a 200M limit, which is what I set for.

If I got some time and find out what went wrong in the first installation I will post it here.

regards,
preminik

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-09-01 01:53

let us know how things go. It is hard to get it right for all environments and perhaps there is a small one that slipped though.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
preminik

Joined: 2011-08-31
Posts: 4
Posted: Tue, 2011-12-13 08:56

To follow up on this, the limit only apprears when I use the GD library and when I set for ImageMagic everything is fine.

Hope this helps someone.

Cheers,
Preminik