Troubleshooting Guide
Solutions to common issues you may encounter with CoinTrail.
Installation Issues
500 Internal Server Error
White screen or "500 Internal Server Error" message after uploading files or during installation.
Solutions:
-
Set correct permissions:
Terminal
chmod -R 755 storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache -
Check Laravel logs:
Open
storage/logs/laravel.logfor specific error messages -
Verify PHP version:
Terminal
php -v # Must be PHP 8.2 or higher -
Clear all caches:
Terminal
php artisan config:clear php artisan cache:clear php artisan view:clear php artisan route:clear
Database Connection Error
Error: SQLSTATE[HY000] [2002] Connection refused or similar
Solutions:
- Verify database credentials in
.envfile are correct - Ensure the database exists and user has proper permissions
- Check if MySQL/MariaDB service is running
- Try using
DB_HOST=127.0.0.1instead oflocalhost - For remote databases, ensure firewall allows connections
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cointrail
DB_USERNAME=your_username
DB_PASSWORD=your_password
Composer Dependencies Error
Error: Missing classes or autoload errors
# Reinstall dependencies
composer install --no-dev --optimize-autoloader
# Regenerate autoload files
composer dump-autoload
# Generate application key if missing
php artisan key:generate
# Cache configuration
php artisan config:cache
Runtime Issues
Prices Not Updating
If cryptocurrency prices are not updating automatically:
-
Verify cron job is configured:
Crontab
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 -
Check cron status in admin panel:
Go to Admin → Settings → Cron Settings to see last run times
-
Review price update logs:
Check
storage/logs/laravel.logfor API errors -
Verify API quota:
CoinGecko free tier allows 10,000 calls/month. Check if quota exceeded.
-
Test manually:
Terminal
php artisan crypto:update-prices --tier=top --limit=10
Email Not Sending
If emails (verification, alerts, notifications) are not being sent:
- Verify SMTP credentials in
.envfile - For Gmail, use an App Password (not your regular password)
- Check if firewall allows outbound connections on port 587/465
- Review
storage/logs/laravel.logfor mail errors
Test email configuration:
php artisan tinker
# Then run:
Mail::raw('Test email', function($message) {
$message->to('your@email.com')->subject('Test');
});
Payment Gateway Errors
Common payment issues and solutions:
- Webhook not working: Ensure webhook URLs are accessible (use HTTPS)
- Test vs Live mode: Verify you're using the correct API keys
- Currency mismatch: Ensure gateway supports your configured currency
- SSL required: Payment gateways require HTTPS
Use services like webhook.site to test webhook delivery during development.
Performance Issues
Slow Page Load
Optimize performance with these commands:
# Cache configuration
php artisan config:cache
php artisan route:cache
php artisan view:cache
# Optimize composer autoloader
composer install --optimize-autoloader --no-dev
# Enable OPcache in php.ini
opcache.enable=1
opcache.memory_consumption=128
High Memory Usage
- Increase PHP memory_limit in php.ini:
memory_limit = 256M - Enable queue workers for heavy background tasks
- Use Redis for caching and sessions (recommended for high traffic)
- Enable database query caching
Common Error Messages
| Error | Cause | Solution |
|---|---|---|
SQLSTATE[42S02] |
Table doesn't exist | Run php artisan migrate |
Class not found |
Autoload issue | Run composer dump-autoload |
Permission denied |
File permissions | Fix storage/bootstrap permissions |
429 Too Many Requests |
API rate limit exceeded | Wait or upgrade API plan |
cURL error 60 |
SSL certificate issue | Update CA certificates |
TokenMismatchException |
CSRF token expired | Refresh page and retry |
ReflectionException |
Missing class/service | Run composer install |
APP_KEY missing |
No encryption key | Run php artisan key:generate |
Enabling Debug Mode
Only enable debug mode temporarily for troubleshooting. Never enable on production as it exposes sensitive information!
To enable debug mode temporarily:
APP_DEBUG=true
APP_LOG_LEVEL=debug
After debugging, remember to disable:
APP_DEBUG=false
APP_LOG_LEVEL=error
Then clear the config cache:
php artisan config:cache
Log Files
CoinTrail stores logs in the storage/logs/ directory:
| File | Contents |
|---|---|
laravel.log |
General application errors and exceptions |
laravel-YYYY-MM-DD.log |
Daily log files (if daily logging enabled) |
To view recent log entries:
# View last 100 lines
tail -n 100 storage/logs/laravel.log
# Watch log in real-time
tail -f storage/logs/laravel.log
If you can't resolve the issue, please contact support with error messages from storage/logs/laravel.log, your PHP version, and steps to reproduce the issue.