-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshoot
Armin edited this page Jan 21, 2021
·
22 revisions
❗ Keep in mind that settings in the .env file are only read on start. You may need to restart your application and clear the configuration cache |
---|
php artisan config:clear
&
php artisan config:cache
&
php artisan serve
- Problem: net::ERR_CONNECTION_REFUSED If you want to deploy your application without Docker or vice versa you´ll notice that the APP_URL key uses port :8000 without Docker and no port option with Docker. This is because the Docker container uses another port internally and refuses the connection on the default port - which is 8000.
Solution
- Make sure to use the .env.example.without_docker
php artisan config:clear
php artisan config:cache
npm install
composer install
-
npm run watch
will compile your Vue components into raw javascript and overwrite the cached app.js (where the other port may be specified at this point and causes the error) php artisan serve
- Problem: SQLSTATE[HY000] [2002] Could not connect because the target computer refused to connect (SQL: select * from information_schema.tables where table_schema = conform and table_name = migrations and table_type = 'BASE TABLE')
Solution:
- Check if XAMPP is running correctly
- Check your .env file if your database credentials are correct
- Log in into phpmyadmin and make sure that a database with the corresponding name exists
❗ Keep in mind that settings in the .env file are only read on start. You may need to restart your docker containers |
---|
docker-compose down
&
docker-compose up -d
- Problem: RuntimeException: No supported encrypter found. The cipher and / or key length are invalid.
Solution:
Run php artisan key:generate
to update APP_KEY on .env, then restart the container docker-compose restart
- Problem: Changes to .env file apparently ignored by laravel
Solution:
Restart cluster. Settings in the .env file are only read on start: docker-compose restart
- Restarting the Docker daemon should resolve most of the issues. If it´s not try the following:
Put down XAMPP and everything that is not for Docker, then restart the Docker daemon in your Windows control panel. After that bring up the containers with
docker-compose up -d
- Problem: wait-for-it.sh script detected wrong line endings:
In pycharm you can quickly change the line endings by clicking on the letters CRLF at the bottom right of the screen and selecting LF. It is always recommended to use LF over CRLF.
Found on Stackoverflow