composer / composer/installers

Your app key is missing message issue

Open
#504 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
1.4k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

After I finished composer installing on my MacBook, then I created new project via:
**composer create-project laravel/laravel:^8.0** _my project_ folder as follow:

Illuminate\Foundation\ComposerScripts::postAutoloadDump [@php](https://laravel.io/user/php) artisan package:discover --ansi Discovered Package: facade/ignition Discovered Package: fruitcake/laravel-cors Discovered Package: laravel/sail Discovered Package: laravel/sanctum Discovered Package: laravel/tinker Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision
Package manifest generated successfully.
77 packages you are using are looking for funding. Use the composer fund command to find out more!
[@php](https://laravel.io/user/php) artisan vendor:publish --tag=laravel-assets --ansi --force No publishable resources for tag [laravel-assets]. Publishing complete.
[@php](https://laravel.io/user/php) artisan key:generate --ansi Application key set successfully.

But I have 2 problems now:

when I run php artisan serve, it gives me strange path, I haven’t yet on my MacBook as follow: _-bash: /Applications/MAMP/bin/php/php7.4.16/bin/php: No such file or director_

When I type: **http://localhost:880/Laravel8/basic/,** it gives me: Index of /Laravel8/basic,

but, when I click on public folder, it opens window shows the following message: _UnexpectedValueException The stream or file "/Applications/XAMPP/xamppfiles/htdocs/Laravel8/basic/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied_

I have run **sudo chmod -R 775 storage** on terminal command line, but the message is still as it.

but when I have run: **sudo chmod -R ugo+rw storage,** it give me the screen as follow:

**Your app key is missing Generate your application encryption key using php artisan key:generate.** _[ Generate key button ]_ and when I click on it, the following message shows: _Something went wrong when executing the solution. Please try refreshing the page and try again._

although, the Generate key was OK, notice above:
_[@php](https://laravel.io/user/php) artisan key:generate_
_Application key set successfully_, further to that, **APP_KEY= is found in .env file.**

And when I run this command via terminal, it gives me that strange path:

_bash: /Applications/MAMP/bin/php/php7.4.16/bin/php: No such file or directory_

What I should do to fix this issue?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.