php icon indicating copy to clipboard operation
php copied to clipboard

Configuring PHP directives without custom images

Open pompushko opened this issue 1 year ago • 5 comments

Hello

Is there any way to increase upload max file size (upload_max_filesize) in PHP.INI without creating own image? Why in in 2k24 by default only 2mb? Is it possible to use environment variables?

Thank you

pompushko avatar Feb 05 '24 13:02 pompushko

https://github.com/docker-library/wordpress/discussions/879#discussioncomment-8310203

tianon avatar Feb 05 '24 19:02 tianon

docker-library/wordpress#879 (comment)

Thank you , but this way dont works in AWS ECS Fargate

pompushko avatar Feb 05 '24 20:02 pompushko

You can't set a custom container command on Fargate? (without that, your only option is going to be to create your own image)

tianon avatar Feb 05 '24 21:02 tianon

You can't set a custom container command on Fargate? (without that, your only option is going to be to create your own image)

Well... I can login into container, add some data in to php.ini like that:

echo "upload_max_filesize=256M" >> $PHP_INI_DIR/conf.d/upload.ini
echo "post_max_size=256M" >> $PHP_INI_DIR/conf.d/postsize.ini
echo "memory_limit=1024M" >> $PHP_INI_DIR/conf.d/memory.ini
echo "max_execution_time=120" >> $PHP_INI_DIR/conf.d/execution.ini

But if I will try to restart\reload apache2 - container restart automatically :D

pompushko avatar Feb 06 '24 09:02 pompushko

You can use volume mount to mount those config to the container

LaurentGoderre avatar Apr 11 '24 15:04 LaurentGoderre