Announcement

#1 2022-04-07 10:40:46

amiet
Member
2022-04-07
5

Cannot upload larger files

Hi,

I'm running Piwigo in docker https://hub.docker.com/r/linuxserver/piwigo

Otherwise everything seems to work fine, but larger MP4 HD/4K videos won't upload. I'm using the browser form for uploading.

I get an error:
"Error: File too large: "

I've tried to modify /etc/php7/php.ini file to:
post_max_size = 3000M
upload_max_filesize = 3000M

Doesn't seem to work.

/# php --ini
Configuration File (php.ini) Path: /etc/php7
Loaded Configuration File:         /etc/php7/php.ini
Scan for additional .ini files in: /etc/php7/conf.d
Additional .ini files parsed:      /etc/php7/conf.d/00_ctype.ini,
/etc/php7/conf.d/00_curl.ini,
/etc/php7/conf.d/00_dom.ini,
/etc/php7/conf.d/00_fileinfo.ini,
/etc/php7/conf.d/00_gd.ini,
/etc/php7/conf.d/00_json.ini,
/etc/php7/conf.d/00_ldap.ini,
/etc/php7/conf.d/00_mbstring.ini,
/etc/php7/conf.d/00_openssl.ini,
/etc/php7/conf.d/00_session.ini,
/etc/php7/conf.d/00_simplexml.ini,
/etc/php7/conf.d/00_xml.ini,
/etc/php7/conf.d/00_xmlwriter.ini,
/etc/php7/conf.d/00_zip.ini,
/etc/php7/conf.d/01_exif.ini,
/etc/php7/conf.d/01_mysqlnd.ini,
/etc/php7/conf.d/01_xmlrpc.ini,
/etc/php7/conf.d/01_xsl.ini,
/etc/php7/conf.d/02_mysqli.ini,
/etc/php7/conf.d/apcu.ini,
/etc/php7/conf.d/imagick.ini,
/etc/php7/conf.d/php-local.ini

The file in /etc/php7/conf.d/php-local-ini is empty except for timezone. Does this somehow override the master php settings? I've also tried to edit the file, but it will reset on reboot / service restart

Any ideas?

Offline

 

#2 2022-04-07 11:18:10

erAck
Only trying to help
2015-09-06
2027

Re: Cannot upload larger files

Be aware that usually there are at least two sets of PHP .ini files, one for command line and one for the Apache environment, and that for each version of PHP installed. You may have modified one that isn't in use for your web server environment or overridden by another file. Check Piwigo menu Admin -> Tools -> Maintenance, tab Environment, click Show Info of your PHP version and look for the .ini files in use.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-04-07 12:01:49

amiet
Member
2022-04-07
5

Re: Cannot upload larger files

The docker uses nginx as a webserver

I checked the php conf page:

Configuration File (php.ini) Path    /etc/php7
Loaded Configuration File    /etc/php7/php.ini
Scan this dir for additional .ini files    /etc/php7/conf.d

Post Max size also shows up as local value and master value correctly..

post_max_size    3000M    3000M

Offline

 

#4 2022-04-07 14:05:25

amiet
Member
2022-04-07
5

Re: Cannot upload larger files

I just tested to create 1GB and 1.2GB files. 1GB file is the maximum that gets accepted, Over 1GB throws the error...

Offline

 

#5 2022-04-11 12:34:30

amiet
Member
2022-04-07
5

Re: Cannot upload larger files

I found the issue and got it fixed. I'll post the solution here for future reference:

The problem was in the local browser upload file:

/gallery/admin/themes/default/template/photos_add_direct.tpl

Around row 100:

Code:

filters : {
                        // Maximum file size
                        max_file_size : '1000mb',
                        // Specify what files to browse for
                        mime_types: [
                                {title : "Image files", extensions : "{/literal}{$file_exts}{literal}"}
                        ]
                },

Changing the max_file_size to e.g. 3000mb, now I can upload larger MP4s.

Offline

 

#6 2022-04-11 12:47:16

erAck
Only trying to help
2015-09-06
2027

Re: Cannot upload larger files

Thanks for reporting the solution back here!
(note to readers: be aware that the host's target file system must support huge files for over 2000mb)


Running Piwigo at https://erack.net/gallery/

Offline

 

#7 2022-04-18 02:48:23

Alexander83706
Member
Boise
2019-07-07
148

Re: Cannot upload larger files

I've also tried to post 2 G  files to the database. I went so far as to modify the Piwigo table structure. Seems fields need to be expanded to account for the larger size files coming in...

That or I am stupid.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact