From 64419af5f96d8a1cb279912c1a8f44740ac22652 Mon Sep 17 00:00:00 2001 From: alexveebee Date: Sun, 20 Apr 2025 21:51:07 +0000 Subject: [PATCH 1/2] add php.ini to /docker/php --- .gitignore | 1 + compose.yml | 3 ++ docker/php/php.ini | 3 ++ templates/installer/config.html | 80 ++++++++++++++++++++++++++++++++- 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 docker/php/php.ini diff --git a/.gitignore b/.gitignore index 5e0ab052..e8d786e6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ thumbs.db Icon? Thumbs.db +.env *.patch *.diff *.rej diff --git a/compose.yml b/compose.yml index 0480a33b..57cd133a 100644 --- a/compose.yml +++ b/compose.yml @@ -30,6 +30,7 @@ services: - ./local-instances/${INSTANCE:-0}/www:/var/www - ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf - ./docker/php/jit.ini:/usr/local/etc/php/conf.d/jit.ini + - ./docker/php/php.ini:/usr/local/etc/php/php.ini environment: VICHAN_MYSQL__HOST: ${VICHAN_MYSQL__HOST} VICHAN_MYSQL__USER: ${VICHAN_MYSQL__USER} @@ -39,6 +40,8 @@ services: VICHAN_REDIS_HOST: ${VICHAN_REDIS_HOST} VICHAN_REDIS_PORT: ${VICHAN_REDIS_PORT} VICHAN_REDIS_PASSWORD: ${VICHAN_REDIS_PASSWORD} + PHP_UPLOAD_MAX_FILESIZE: 10M + PHP_POST_MAX_SIZE: 10M depends_on: - db diff --git a/docker/php/php.ini b/docker/php/php.ini new file mode 100644 index 00000000..0e4afdc0 --- /dev/null +++ b/docker/php/php.ini @@ -0,0 +1,3 @@ +post_max_size=10M +upload_max_filesize=10M +max_file_uploads=5 \ No newline at end of file diff --git a/templates/installer/config.html b/templates/installer/config.html index adf69913..c2ca6ec6 100644 --- a/templates/installer/config.html +++ b/templates/installer/config.html @@ -51,7 +51,37 @@ Images Maximum image filesize (bytes): - + + PHP file size limit + + The php file size limit can be configured in php.ini ( /usr/local/etc/php/php.ini ) + + Using docker + + if you have pulled this from GitHub + Then you can set the file size limit at ./docker/php/php.ini + For example, to set the limit to 10MB, add the following lines: + +upload_max_filesize = 10M +post_max_size = 10M + Then restart the containers. + + + + Manual Configuration + + If you are not using docker, you can set the file size limit in the php.ini file: + For example, to set the limit to 10MB, add the following lines: + +upload_max_filesize = 10M +post_max_size = 10M + Then restart the PHP server. + + + + If this is not set, the default value is 2MB. + + Thumbnail width: @@ -99,3 +129,51 @@
The php file size limit can be configured in php.ini ( /usr/local/etc/php/php.ini )
if you have pulled this from GitHub
Then you can set the file size limit at ./docker/php/php.ini
For example, to set the limit to 10MB, add the following lines:
+upload_max_filesize = 10M +post_max_size = 10M
Then restart the containers.
If you are not using docker, you can set the file size limit in the php.ini file:
Then restart the PHP server.
If this is not set, the default value is 2MB.