Docker Community Forums

Share and learn in the Docker community.

I have problems with editing the php.ini on the site, mounted in docker

Hello, I have a website, with php and apache. I want to increase the size of file uploads, but can’t find the php.ini.
I tried it with an htaccess file and nothing.
Try the site out of a container on my local machine and it works for me with the php.ini edition, since wampserver defaults to a php.ini.
How can I edit the parameters in docker, since this file is missing. Look it up in / usr / local / php and this directory doesn’t exist.

I do not speak English, sorry if you do not understand well

Hi :slight_smile:

Which image are you using?
also, you should be able to use htaccess for upload_max_filesize and post_max_size like:

php_value post_max_size 15M
php_value upload_max_filesize 10M

centos7 image, I have the htaccess configured like this and the configuration does not recognize me.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

php_value upload_max_filesize 5M
php_value post_max_size 30M

Dont know if it matters, but try and move the php_value part to the top of htaccess, so the rewrite rule dosnt get triggered before the php_value