composer/installers

Your app key is missing message issue

Ayman1970 opened this issue · 0 comments

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 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 artisan vendor:publish --tag=laravel-assets --ansi --force No publishable resources for tag [laravel-assets]. Publishing complete.
@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 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?