1

I have /etc/opt/remi/php80/php.ini

memory_limit = 2048M

when i do: php -r "echo ini_get('memory_limit').PHP_EOL;"

I get: 2048M

phpinfo() shows

Loaded Configuration File   /etc/opt/remi/php80/php.ini
memory_limit    128M    128M

what am i missing?

notes:

memory_limit does not exist in any other ini file in any folder/subfolder of this dir.

I have restarted apache numerous times.

bart2puck
  • 2,432
  • 3
  • 27
  • 53

1 Answers1

1

Memory limit is decoded into a signed 32 bit integer number of bytes so you may be overflowing. Why not set it to -1 which is unlimited. Also if you're running php-fcgi then you need to restart that service rather than Apache.

  • memory_limit of -1 is strongly discouraged on production environments since that allows PHP to eat all your resources and crash the server – E S Nov 10 '22 at 14:04