Laravel 5.2 not reading env file

前端 未结 26 2189
时光说笑
时光说笑 2020-11-28 20:52

After upgrading to Laravel 5.2, none of my .env file values are being read. I followed the upgrade instructions; none of my config files were changed except aut

26条回答
  •  执笔经年
    2020-11-28 21:16

    I experienced this. Reason was that apache(user www-data) could not read .env due to file permissions. So i changed the file permissions to ensure that the server (apache) had read permissions to the file. Just that and boom, it was all working now!
    Update:
    How to do this varies, depending on who owns the .env file, but assuming it belongs to the Apache www-data group, you can do this:

    sudo chmod g+r .env
    

    Modify it depending on your permission structure.

提交回复
热议问题