Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When running

php artisan key:generate

I can see the generated key in my shell, but the variable 'key' in app.php remains empty.

Running on localhost with windows-apache-php 5.4 - mysql.

Never had this problem before with laravel 4 beta version.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
742 views
Welcome To Ask or Share your Answers For Others

1 Answer

Had the same problem ...

  1. Opened app.php
  2. Remove the entry that says 'YourSecretKey!!!'
  3. Ran 'php artisan key:generate'

Showed me a key in the console, but nothing in app.php!

Solution is ... unlike Laravel 3, don't delete the default YourSecretKey!!! in app.php, just run the command and it will work.

Hope this helps.

Bagwaa


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...