Documentation Reward Loyalty

Troubleshooting Server Errors

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, please send 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.

Numeric Value Out of Range Error

You might encounter a "Numeric Value Out of Range" error in the log file (storage/logs/laravel.log).

This error typically appears in logs across various hosting environments, manifesting as a challenging issue to diagnose due to its diverse potential causes. Key contributors include:

  • Database Latency: High response times in MySQL or MariaDB.
  • Database Configuration: Unconventional settings in your database system.
  • Distributed Systems Delays: Time discrepancies in distributed environments, particularly impacting Snowflake ID generation.

The error seems related to Laravel's handling of the static::creating method during the boot function of a model. An update to Laravel may address this in the future.


Immediate Fixes:

  1. Change Snowflake Setting for MySQL/MariaDB: If you're using MySQL or MariaDB, disable the Snowflake ID generation by setting SNOWFLAKE_ENABLED=false in your .env.blueprint file. After making this change, a reinstallation of the application is required. Reinstallation Guide.

  2. Switch to SQLite: SQLite might offer a more streamlined solution for your setup. Switching to SQLite often resolves this issue. For installation instructions with SQLite, refer to the Reinstallation Guide. For more insights into why SQLite might be beneficial, read this detailed article.

Other Considerations:

  1. Review and Optimize Database Settings: Investigate your MySQL/MariaDB settings for any unusual configurations that might contribute to high latency or other issues.

  2. Consider Switching Hosting Provider: We recognize that changing your hosting provider can be a significant and often undesirable step. However, it's important to note that this error tends to occur only in specific hosting environments. If you have direct support with the technical staff of your hosting provider, we are more than willing to collaborate with them to pinpoint the cause of this issue.

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 the 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 the documentation.