Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modifying php.ini in the image #35

Open
o0larrylurex0o opened this issue Dec 27, 2018 · 2 comments
Open

modifying php.ini in the image #35

o0larrylurex0o opened this issue Dec 27, 2018 · 2 comments
Assignees

Comments

@o0larrylurex0o
Copy link

Hello,
I'm struggling with your image to modify the php.ini to upload bigger file (limited to 8MO by default)

Is is possible to modify that in the docker file so it can be set from the beginning ?
as explained here
https://docs.moodle.org/36/en/File_upload_size#Upload_file_size_restrictions

thanks a lot

@o0larrylurex0o o0larrylurex0o changed the title modifying php.ini modifying php.ini in the image Dec 27, 2018
@jmhardison jmhardison self-assigned this Jan 8, 2019
@stalin29
Copy link

Hello, I wanted to know how I can increase the upload space since the limit is only 2mb ?

@smarbos
Copy link

smarbos commented Oct 28, 2021

I think you should add a new volume in docker-compose.yml mapping a php.ini path in the host, and the one in the container.

VOLUMES:
    - ./config.php:/var/www/html/config.php
    - ./apache2.conf:/etc/apache2/apache2.conf
    - ./php.ini:/etc/php/7.4/cli/php.ini

Check the path for php.ini in the container:
docker exec -ti <container_name>: php --ini | grep "Loaded Configuration File"

If you like, you could copy the file from te docker to the host machine doing this:
docker cp <container_name>:/etc/php/7.4/cli/php.ini .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants