You likely encounter those problem when developing Laravel Application using Windows Machine.
- Frequent Apache Crash (Connection reset)
- “Access denied for user ‘homestead’@’localhost’ (using password: YES)”, even
.envis set to different credential
.envsetting drifting between two separate Laravel installations (e.g. http://127.0.0.1:8080 .env setting applied to http://127.0.0.1:8081)
Because the “dotenv” package, used by Laravel, work in a way that is not thread-safe.
And “Dotenv was never meant to be used in production“.
Avoid PHP Apache Module setup in anyway.
If you are using XAMPP for Windows, you are running PHP as Apache Module.
Install a proper WAMP stack: https://blog.tiger-workshop.com/wamp-development-machine-setup-note/
php artisan config:cache to cache .env config.
You will need to run it every time you change the config.