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

I have read several thread to avoid this message:
“The current PHP memory limit is below the recommended value of 512MB.”

I change in /etc/php/php.ini

image
may be it 's not the right php.ini.
could tell me where I can put 512M in which file to avoid this message.
thanks

I have the same issue.
I have modified php.ini both in apache2 and cli, but same error.

php -v
PHP 8.0.3 (cli) (built: Mar 5 2021 07:54:13) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.3, Copyright (c) Zend Technologies
with Zend OPcache v8.0.3, Copyright (c), by Zend Technologies

sudo -u www-data php -i | grep memory_limit
memory_limit => 1024M => 1024M

sudo -u www-data php -i
phpinfo()
PHP Version => 8.0.3

System => Linux delucloud 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64
Build Date => Mar 5 2021 07:54:13
Build System => Linux
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/8.0/cli
Loaded Configuration File => /etc/php/8.0/cli/php.ini

Thank you
Andrea

Is there someone here?

I have also encountered this problem

sed -ri '/memory_limit/s/[0-9]+/512/' `find / -name php.ini`

Restart php-fpm after modification