Reward Loyalty Documentation

Troubleshooting Server Errors

Server errors can be a daunting task, but this guide will help you navigate and resolve some of the most common problems.

Error 500

Check the log: If you encounter a 500 error, your first step is to check the storage/logs/laravel.log for detailed error insights. If the log does not provide a clear answer, do not hesitate to send us a support message.

500 Error Right After Uploading

If you get a 500 error message immediately after uploading the script instead of the installation screen, it is often because the PHP extension ext-intl (Internationalization) is not present. Make sure this extension is activated.

Display Folder Structure Instead of Installation Screen

If you see the directory tree instead of the installation interface, this can usually be due to:

  1. Missing .htaccess: Some operating systems, such as macOS, hide files beginning with a dot (.). If you cannot find the .htaccess file in the directory tree, it is probably because it is hidden by your operating system. On Mac systems, this problem can be remedied by pressing Command + Shift + . (the dot key), which will display the hidden files in the directory.

  2. Mod_rewrite disabled: There is a chance that mod_rewrite is not enabled, meaning that the .htaccess file is not parsed. While this is unusual because mod_rewrite is generally enabled by default, it is still a possibility worth investigating.

Problems Uploading Images

Modify php.ini file: Problems uploading images can occur if the proc_open and proc_close functions are disabled in your PHP setup. This is easy to fix:

  1. Locate the php.ini file:
    Determine the location of your php.ini file with the php --ini terminal command.

  2. Edit the php.ini file:
    Start your php.ini file and look for the disable_functions directive. If it is missing, add it to the document.

  3. Change the directive:
    Remove proc_open and proc_close from the disable_functions directive. A typical appearance after these deletions would be:

    disable_functions = exec,passthru,shell_exec,system
    
  4. Save changes and restart the server:
    Save your changes to the php.ini file and restart your web server.

After completing these actions, the proc_open and proc_close functions should be active in your PHP setup, solving the problem. In certain hosting contexts, the disable_functions setting may also be in the PHP FPM Settings.

Problem With Remember Me Functionality

Are you experiencing problems with the Remember me login feature? If users have to sign in every time they visit the site, Varnish caching may be the culprit. By default, Varnish does not manage cookies effectively, which leads to such problems. If you're not adept at customizing Varnish to sync with Laravel cookies, it's best to disable Varnish.

Error Management After Upgrade

Refresh the Autoload Class Map: Post-upgrade errors can often be addressed by refreshing the autoload class map. To do this, run the composer dump-autoload command within your SSH CLI.

$ cd /path/to/your/installation
$ composer dump-autoload

If the problem persists, try the following commands:

$ cd /path/to/your/installation
$ rm -rf vendor composer.lock
$ composer update

Make sure Composer is installed on your server. If SSH access is inaccessible or the installation appears to be corrupt, it may be time to consider Reinstall while retaining existing data.

Additional Troubleshooting Tips

  1. Requirements: Before any other troubleshooting steps, ensure your hosting environment aligns with the required specifications. This includes PHP and database versions, necessary PHP extensions, and other server requirements.

  2. Version Compatibility: Stay updated. Make sure you're utilizing the latest version of our script to benefit from the most recent patches and enhancements.

  3. Logs: When things go wrong, logs are your best friend. Regularly check logs for detailed insights and error descriptions:

    • storage/logs/laravel.log
    • PHP Error log
    • Apache/Server log
  4. Hosting Limitations: Keep in mind, some hosting services, especially shared ones, may impose restrictions that might not be apparent but can create issues.

  5. File Permissions: Verify permissions for essential directories. Incorrect permissions may hinder certain operations.

  6. Database Connectivity: Ensure database connection parameters are accurate and that the database server is operational.

  7. Customizations and Third-party Plugins: Alterations or third-party additions to the base script might be a source of conflicts. If you've made custom changes or installed plugins, consider them as potential culprits.

  8. Documentation Reference: For diverse clarifications and additional guidance, always refer to our comprehensive documentation.