framework APP_KEY not cached unless config:cache is run twice PHP
- Laravel Version: 8.42.1
- PHP Version: 7.4.3
In one of our automated deployment processes for a pre-production environment, we have had a strange issue in the way that APP_KEY is cached. We always deploy from a clean checkout of the repository (symlinking to a persistent
storage directory, but with a clean
bootstrap/cache folder), and in the last steps of the process we run
We're noticing that if we only run
cache:config once, the
bootstrap/cache/config.php file will not have the APPKEY value cached (
key will just have '') - all other values are cached just fine (e.g. database passwords and so on). If we run
cache:config again (without touching anything else or running any other commands), then it will have the APPKEY value correctly cached.
Any ideas as to why we'd need to run
config:cache twice? It does work this way, but it feels wrong :-).
Steps To Reproduce:
If at the end of our deployment process we run the below commands,
bootstrap/cache/config.php will not have APP_KEY cached (but will have everything else cached just fine).
php artisan migrate --force --seed php artisan cache:clear php artisan view:clear php artisan route:clear php artisan key:generate umask 0007 php artisan config:cache php artisan up sudo /usr/sbin/service php7.4-fpm reload
If we change it so it runs
config:cache twice, it will have APP_KEY cached:
php artisan migrate --force --seed php artisan cache:clear php artisan view:clear php artisan route:clear php artisan key:generate umask 0007 php artisan config:cache php artisan config:cache php artisan up sudo /usr/sbin/service php7.4-fpm reload
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
- Direction for finding zookeeper issues - Go clickhouse-operator
- App crash with error: "Bad JNI version returned from JNI_OnLoad" when building .apk - Dart flutter-ffmpeg
- darktable minor usability: position of "module order" tickbox in selective copy-paste dialog C
- gpdb Explain analyze coredump while direct dispatch is enabled C
- [feature request] new prompt line for "post-command output" / "error indicator" - Shell powerlevel10k
- zephyr Failed phy request not retried and may prevent DLE procedure during auto-initiation C
- Replace relative repo links in README me with absolute links. - Go unpackerr
- ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models' - django-advanced-filters