Closed brentkearney closed 4 years ago
@brentkearney From what you provided in here, it appears you included your custom configuration into chevereto-php.ini
and mount it into the container under /usr/local/etc/php/conf.d/chevereto.ini
.
Please include the content of your chevereto-php.ini
into this issue.
Also, I'll have to check to see if PHP is loading custom configuration from the directory /usr/local/etc/php/conf.d
It definitely is parsing additional php files there:
Running command /usr/local/bin/php --ini
in the container shows this:
Configuration File (php.ini) Path: /usr/local/etc/php
Loaded Configuration File: (none)
Scan for additional .ini files in: /usr/local/etc/php/conf.d
Additional .ini files parsed: /usr/local/etc/php/conf.d/chevereto-php.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
So adding this line to docker-compose.yml:
- ./chevereto-php.ini:/usr/local/etc/php/conf.d/chevereto-php.ini
With this as the content of chevereto-php.ini
worked for me (clearly, change the values to whatever you need):
file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
@tanmng I see you already have this available, basically the same thing here: https://github.com/tanmng/docker-chevereto/tree/master/examples/bigger-files I would suggest to do this by default, so people who are not so technical can actually use the docker-compose.yml file without screwing around working this out.
@tanmng I use both of these ways
@tanmng 我这两种方法都用
- 定义chevereto-php.ini
- 定义https://github.com/tanmng/docker-chevereto/tree/master/examples/bigger-files中提及的php.ini但它们不起作用,我得到了“文件太大”我如何解决这个问题?
I solved it, you need to go to Dashboard > Settings > Image Upload
I mounted a custom php.ini in my docker-compose.yml:
And the settings appear if I login and go to the Dashboard. It says "Max. upload file size: 100 MB", and "Max. post size: 100 MB", and "Memory limit: 512 MB". However, when I try to upload a photo, I get an error message, "File too big", and I can see in the top-left corner behind the pop-up, "JPG PNG BMP GIF 2MB".
So there must be a second place where the file size is limited. Any ideas?
Thanks!