Which php.ini is the correct one?

Im looking to see what our upload file limit is. In the Settings I see

Version: 7.3.20
Memory Limit: 128 MB
Max Execution Time: 3600
Upload max size: 16 GB

However in the /snap/nextcloud/current/config/php/php.ini it shows:
post_max_size = 8M
upload_max_filesize = 2M

Am I looking in the right place? I tested and was able to upload a 1.5GB file. Can someone point me in the right direction?

Nextcloud version 19.0.1
Operating system and version 16.04.4 LTS

You can test it with

php -i |fgrep memory

Do you use the correct version with your webserver?
I think you use the snap version from php (snap and apache2/nginx).
I hate snap and do not understand the software. Sorry.

Which snap version do you use?
In the package you can read with php version is used.
It is snap. You can not really change things. Sorry.

1 Like

Looks like the settings are set there:

php_value[upload_max_filesize] = 16G
php_value[post_max_size] = 16G

Read for configure snap package:


sudo snap set nextcloud php.memory-limit=512M

Snap is so complicated.
Perhaps you can install Debian 10 and the newest Nextcloud.
Than you can configure all on the correct linux places.


1 Like

Yes, the memory-limit is the only php setting that could be set via snap set .
source: php-utilities

The upload_max_filesize is set hard in the config files. (I linked it in the post before)

; Configure larger uploads than the default
php_admin_value[upload_tmp_dir] = ${SNAP_COMMON}/nextcloud/tmp
php_value[upload_max_filesize] = 16G
php_value[post_max_size] = 16G

; Allow for a dynamic PHP memory limit
php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT}

The snap package is a out-of-the-box solution, managed by the snap-devs, so users can run a safe nc-installation without special knowledge. Most settings are not meant to be changed by the user.
I would also prefer a self-managed installation with the help of my own scripts. If you want to have a deep understanding of your setup or you want a different setup you should not use snap.