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
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.
Offline
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
I just tested to create 1GB and 1.2GB files. 1GB file is the maximum that gets accepted, Over 1GB throws the error...
Offline
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:
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
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)
Offline
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