title: PHP(Laravel 5.4) Fatal error Allowed memory size ... > memory_limit not work
body: <p>I entered the command
  <code>'php artisan key:generate'</code> or <code>'php artisan'</code>
  but result is 'PHP Fatal error'</p>
  
  <p><code>$ php artisan
  PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to &gt; allocate 20480 bytes) in laravel/vendor/composer/autoload_static.php on line 128
  </code></p>
  
  <p>My PHP version is</p>
  
  <p>PHP 7.2.11-4+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov  4 2018 05:10:57) ( NTS )</p>
  
  <p>I tried to modify nginx and php.ini.</p>
  
  <p><code>vi /etc/php/7.2/fpm/php.ini
  memory_limit = -1
  OR
  memory_limit = 1024MB
  </code></p>
  
  <p>and</p>
  
  <p><code>fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;</code> in nginx</p>
  
  <p><code>service nginx restart
   service php7.2-fpm restart</code></p>
  
  <p>But not work..</p>
  
  <ul>
  <li>I add to <code>ini_set('memory_limit', '1024MB');</code> in autoload_static.php
  but not work.</li>
  </ul>
  
  <p>How can i do?</p>
  
  <p>Please .. :)</p>