How to remove setting applying local memory_limit for php on an nginx server

Viewed 36

Upon checking the php memory_limit set on the laravel project hosted by the nginx server, it has a differing value for the local memory_limit and master memory_limit

enter image description here

I want the project's php memory_limit to follow the master setting (php.ini) rather than the local setting.

However I am unable to find where the memory limit of 1536M is being set on, can someone please point me in the right direction

I have checked the following files

  1. nano /etc/nginx/conf.d/default.conf (No lines with memory_limit found)
  2. nano /etc/php-fpm.d/www.conf (;php_admin_value 128M)
  3. nano /etc/php.ini (memory_limit = 128M)

enter image description here

1 Answers

I am able to reproduce your issue.

Master value will be always from php.ini file only. When you update you need to restart nginx and php-fpm to get Updated value

But Local value will be from your laravel code. You might have set it in laravel files as below ini_set('memory_limit', '1536M');

Search for 1536 or ini_set or memory_limit in your source code.

Hope this resolves your issue

Related