Debugging Laraship Issues
If you run into an issue with Laraship either during setup, configuration or development. Laraship has a Logging system where errors can be found under storage/logs/laravel.log.
- Also if you’re at the development stage, it’s recommended to turn “APP_DEBUG” flag at .env file to view error on the screen instead of generic error codes like “Error 500” by changing the value from false to true.
- Most common issues happen during the installation are the result of :
- missing PHP module
- the mismatch between your local PHP and server PHP versions, which causes the composer to load incompatible dependencies. to check PHP command-line version please run the command :
php --version
to check website PHP version at the website, just put this single line of PHP code in a blank text file, for example, test.php, place it under public folder open it on the server:
<?php phpinfo() ?>
- DB connection error “Yo need to check database connection under.env”
- Application key not generated: you need to run the command:
php artisan key:generate
- Passport Keys are not generated: you need to run the command:
php artisan passport:install
Also during development, we always recommend taking a backup of your Laraship DB so you can restore in case you were not able to figure out the reason of the issue and use GIT to track file changes