handesk icon indicating copy to clipboard operation
handesk copied to clipboard

.env file not re-read

Open webafrancois opened this issue 6 years ago • 1 comments

We change many times the .env file with many parameters but the php artisan migrate --seed doesn't use the changes with an error with mysql :

In Connector.php line 67:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

In Connector.php line 67: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known

So we need to purge the cache with :

php artisan config:cache
php artisan config:clear

before run php artisan migrate --seed to use safely the deploy script.

It would be great to add it in the documentation page. Our source : https://stackoverflow.com/questions/34420761/laravel-5-2-not-reading-env-file#36789122

webafrancois avatar Jan 22 '20 16:01 webafrancois

sounds good, can you submit a PR?

BadChoice avatar Feb 08 '20 14:02 BadChoice