System Maintenance and Troubleshooting
As a self-hosted application, Fixly requires occasional maintenance to ensure it remains fast and secure. This guide covers how to view error logs, manage your system cache, and troubleshoot common issues like license activation failures.
1. Viewing System Logs
If the application behaves unexpectedly or displays an error message, the first place to look is the system log.
- File Location: storage/logs/laravel.log
- How to read it: This file records every error encountered by the system, including the exact time, the file involved, and a description of the problem (e.g., "Database connection refused" or "SMTP Authentication failed").
- Clearing logs: It is safe to delete this file if it becomes too large; the system will automatically create a fresh one the next time an event occurs.
2. Managing the System Cache
Laravel caches various parts of the application (like routes, views, and configuration) to improve performance. Sometimes, after you manually edit a file or change a setting, the site may not update until the cache is cleared.
Run these commands via SSH in your project root to refresh the system:
- Clear all cache: php artisan optimize:clear
- Clear view cache: php artisan view:clear (Essential after editing .blade.php files).
- Clear configuration: php artisan config:clear (Essential after editing your .env file).
3. Troubleshooting License Issues
Fixly requires a valid connection to the licensing server to remain active.
- Error: "License Invalid or Expired":
- Check your .env file to ensure the LICENSE_KEY matches exactly what is in your dashboard at license.bookarepair.online.
- Ensure your server has an active internet connection so it can reach https://license.bookarepair.online/api/verify.
- Verify that the LICENSE_SERVER_SECRET has not been modified.
- Automatic Checks: The system periodically re-verifies your license. If it fails to connect for an extended period, the admin panel may be restricted until the connection is restored.
4. Performing System Updates
When a new version of Fixly is released, follow these steps to update safely:
- Backup: Export your database and save a copy of your .env file.
- Upload Files: Overwrite your existing files with the new version.
- Install Dependencies: Run composer install --no-dev --optimize-autoloader.
- Run Migrations: Run php artisan migrate. This updates your database structure to support new features without deleting your existing data.
- Clear Cache: Run php artisan optimize:clear.
5. Fixing Common Frontend Issues
- Images not appearing: This usually means the "Storage Link" is missing. Run php artisan storage:link via SSH.
- Styling looks broken: If you have modified Blade files or Tailwind configurations, ensure you have run npm run build and uploaded the resulting files in the public/build directory.
- White Screen (WSOD): This is almost always caused by a PHP error or a missing file. Check your laravel.log immediately to identify the missing component.
6. Database Backups
While Fixly manages your data, it does not perform automatic off-site backups.
- Manual Backup: Use a tool like phpMyAdmin to export your database regularly.
- Automated Backup: You can set up a "Cron Job" on your server to run a database dump daily. This is highly recommended to protect your repair history and customer data.