title: Laravel 5.2 is not reading from .env on ubuntu
body: <p>Note: This question is not a duplicate of these questions:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/34420761/laravel-5-2-not-reading-env-file">Laravel 5.2 not reading env file</a></li>
  <li><a href="https://stackoverflow.com/questions/37023633/laravel-5-2-env-sometimes-doesnt-load-in-time">Laravel 5.2 .env sometimes doesn&#39;t load in time</a></li>
  </ol>
  
  <p>I'm getting this error: </p>
  
  <pre><code>production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /home/coder/.local/share/Trash/files/myblog/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:45
  </code></pre>
  
  <p>When I tried <code>dd($config['key']);</code> it returns 'null'. Even the database environment variables return null. So it means that Laravel is not reading from the .env file. </p>
  
  <ol>
  <li>What is the reason? </li>
  <li>How to fix this?</li>
  </ol>
  
  <p><strong>right now I've solved the issue by manually specifying key in Config/app.php file and setting the database values in Config/database.php file</strong></p>
  
  <p><strong>I suspect that I've got the permissions/owner wrong on the .env file. I'm developing in <a href="https://elementary.io" rel="nofollow noreferrer">Elementary OS</a></strong></p>