PHP Memory Limit doesn't change from 128MB

Nextcloud version (eg, 20.0.5): Nextcloud Hub II (23.0.3)
Operating system and version (eg, Ubuntu 20.04): CentOS 8
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37 (centos)
PHP version (eg, 7.4): 8.0.17

The issue you are facing:
I’ve just installed it and in Overview I get:

The PHP memory limit is below the recommended value of 512MB.

Nextcloud is my root directory of Apache, if that matters.

I’ve tried changing the value in /etc/php.ini for both 1G and 512M. Nothing changed.

Tried adding the value to .user.ini and /etc/php-fpm.d/www.conf, but nothing seems to change it.
If I do phpinfo() it returns the value I change (so 1G), but regardless of this when I go to the System tab in the Dashboard it shows 128MB.

Same happens with the Upload max size value, so this makes me think that Nextcloud uses some other php.ini file (but there’s none in my system) or the values get updated in some other config file (couldn’t find it anywhere I looked or in the docs).


$CONFIG = array (
  'instanceid' => '---',
  'passwordsalt' => '---',
  'secret' => '---',
  'trusted_domains' =>
  array (
    0 => 'URL',
  'datadirectory' => '/mnt/cloud',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://URL',
  'dbname' => 'NEXTCLOUD_DB',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'NEXTCLOUD_USER',
  'dbpassword' => 'DB_PASSWD',
  'installed' => true,
  'default_phone_region' => 'US',
  'memcache.local' => '\OC\Memcache\APCu',
  'trusted_proxies' => ['<proxy_IP>'],
  'overwrite.cli.url' => 'https://URL/',
  'htaccess.RewriteBase' => '/',

Solved it! I added the values in /etc/php-fpm.d/www.conf and then did service php-fpm restart.