Upload file size impossible not changing

Nextcloud version (eg, 20.0.5): 21.0
Operating system and version (eg, Ubuntu 20.04): 20.4.2
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.4): 7.4

The issue you are facing: I have tried to change all the possible parameters in order to increase the upload file limit, and even all of the changes I did, I cannot upload files larger than 1MB.
I’ve tried changing:

  • in php.ini file:
memory_limit = 8192M
upload_max_filesize = 8192M
post_max_filesize = 8192M
max_execution_time = 3600
max_input_time = 3600
  • in nginx reverse proxy conf:
client_max_body_size 8192M;
  • in .user.ini:
php_value upload_max_filesize 8G
php_value post_max_size 8G
php_value max_input_time 3600
php_value max_execution_time 3600
  • in .htaccess:
php_value upload_max_filesize 8G
php_value post_max_size 8G
php_value max_input_time 3600
php_value max_execution_time 3600

To clarify, I should say that I have installed Nextcloud in a docker cointainer and it works together with other containers: mariadb, letsencrypt and nginx-proxy

Is this the first time you’ve seen this error? (Y/N):N

Steps to replicate it:

  1. Open Nextcloud web/client.
  2. Upload a file larger than 1MB
  3. Wait until it fails (aprox 2ms)

Please, can anyone help me? It is almost working perfectly…

In which folder are you changing the php.ini? Do you have fpm enabled?

If fpm is enabled, the php.ini file need to be changed at /etc/php/7.4/fpm

Changing it in the apache folder only will not help.

I’m changing the php.ini file located at /usr/local/etc/php/.
Inside the docker container (and even in the host) I don’t have a directory in the path /etc/php/.

OK, i just wanted to mention it. I was struggling for this reason. But i do not have NC running in a container, but directly installed with FPM and Redis

Thanks, but I’m not using FPM.

Hope anyone can help me with this… I’ve been trying to fix it for a couple of weeks now.

what does your php.info say ?

create a info.php file on your webserver check where php.ini is configured

<?php phpinfo(); ?>

this will solve your prob, if your installation is self hosted
brNP

Where should I create the file so I can access it from the web?

I mean, I have a domain configured let’s say cloud.bla.com. So if I want to see the php info file in cloud.bla.com/info.php, where should I create that file? How could I know the path?

its the root of your webserver
simple add the file there and after u done delete it

one of many ways (if the installation fits)
somewhere maybe in /var/www/nextcloud/
create info.php with the content and call it via browser

I did try that. I created an info.php file inside the docker container’s path where the webserver loads the html code (/var/www/html/) but when I try to load the web page cloud.bla.com/info.php it redirects me to cloud.bla.com/login

your config redirects all to login …
you have to solve this first

btw is this the folder where your nc stuff is ?

But where can I find that config file? Where can I fix the redirects? In an apache config file maybe?

Yes, in that directory is where all the nextcloud web is; data folder has a symlink and is placed in another path

oh boy …

last try (what does say)
php -i |grep php.ini | wasnt workin on a system here so we came up with the info.php on the server (showed us the php.ini edited it ansprob solved)

how do you admin your nextcloud and your server ?
no offence but … no time here to support apache stuff

your problem is that you dont know what php.ini is used by your system … and on the other hand u / we dont know if the php.ini is set up correctly

im sory but im out

Well, it’s ok if you don’t want to help me.

I know which php.ini should be using my system and I have basic knowledge of how Apache works, what I don’t know is how Nextcloud and Docker work together.

Here you have a bunch of info about the php.ini files that nextcloud should use:

root@283de8c25dda:/usr/local/etc/php# php -i | grep .ini
Configuration File (php.ini) Path => /usr/local/etc/php
Scan this dir for additional .ini files => /usr/local/etc/php/conf.d
Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini,
/usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gmp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-imagick.ini,
/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-memcached.ini,
/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-redis.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini,
/usr/local/etc/php/conf.d/nextcloud.ini,
/usr/local/etc/php/conf.d/opcache-recommended.ini
root@283de8c25dda:/usr/local/etc/php# cat conf.d/nextcloud.ini
memory_limit = 8192M
upload_max_filesize = 8192M
post_max_filesize = 8192M
max_execution_time = 3600
max_input_time = 3600

and thats not true

nextcloud uses the php.ini used y the apache
“thats the bottom line”

if u have basic knowledge of how Apache works
ad a simple php page with the source posted above
and see where the php.ini is located then edit this file
and check in nextcloud if changes affected

btw u restarted apache service & eg php8.0-fmp after each change ?
just to be shure we are on the same page

not willing to help and no time for support are to different pages in different books

So, here you go:

It may seems like something crazy, but its using the same php.ini files I checked before.

After each change I even restarted the server, as it is a homeserver and stopping it doesn’t affect me.

loaded config file none !!!
check this

I know, but it is parsing all the other ini files in which all the parameters are set for php.

For example:

Which is set in /usr/local/etc/php/conf.d/nextcloud.ini

go to nextcloud dash and post screenshot of php
should look something like this
grafik

image

Despite that info, I still cannot upload files larger than 1MB (I have tried again right now)

oh i see,
your docker is causin the problem / limitation
sorry this has nothing to do with nextcloud (btw which version r u rnnin ? )

and 8GB of ram is pretty fly for a docker installation
what kind of beast are u runnin as bare metal

anyhow you have to check your docker setup from the scratch