I had the same problem, but in docker. when I ran into this problem, added client_max_body_size 120M; into the configuration of my Nginx server,
The default nginx configuration file path is /etc/nginx/conf.d/default.conf
server { client_max_body_size 120M; ...
It changes the maximum body size to 120 megabytes.
after that I added these three lines to my PHP docker file
RUN echo "max_file_uploads=100" >> /usr/local/etc/php/conf.d/docker-php-ext-max_file_uploads.ini RUN echo "post_max_size=120M" >> /usr/local/etc/php/conf.d/docker-php-ext-post_max_size.ini RUN echo "upload_max_filesize=120M" >> /usr/local/etc/php/conf.d/docker-php-ext-upload_max_filesize.ini
since the docker PHP image automatically includes all the configuration files from the path ( /usr/local/etc/php/conf.d/ ) in the php.ini file, the PHP configuration file will change to these three lines and the problem should disappear
adnan ahmady
source share