简体   繁体   中英

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

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

在此处输入图像描述

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)

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM