Ajax not loading config from env file

In some weird cases (unreplicable), the system behaves weirdly, not loading the .env file configuration. Any ideas?


1 Like

Hi @rudolf-erdei

I notice this problem very rarely, and I agree it appears to be Laravel failing silently when it can’t access the .env file, which manifests as missing configuration.

Technically, it can be prevented by caching the configuration in production:

php artisan config:cache

This is something that should be done anyway since it improves page load times quite a bit.

1 Like

Great! Thanks! Will implement it.