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.
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:
Missing .htaccess: Some operating systems, such as macOS, hide files beginning with a dot (.). If you cannot find the
.htaccessfile 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.
Mod_rewrite disabled: There is a chance that
mod_rewriteis not enabled, meaning that the
.htaccessfile is not parsed. While this is unusual because
mod_rewriteis 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_close functions are disabled in your PHP setup. This is easy to fix:
Locate the php.ini file:
Determine the location of your
php.inifile with the
php --initerminal command.
Edit the php.ini file:
php.inifile and look for the
disable_functionsdirective. If it is missing, add it to the document.
Change the directive:
disable_functionsdirective. A typical appearance after these deletions would be:
disable_functions = exec,passthru,shell_exec,system
Save changes and restart the server:
Save your changes to the
php.inifile and restart your web server.
After completing these actions, the
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.
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
Numeric Value Out of Range Error
This error occurs in logs from different hosting environments, making it difficult to pinpoint the exact cause. The error may be due to latency issues, database configurations or server clock inaccuracies. Especially under heavy load, the deviation in server time can exceed the allowed limits in Snowflake ID generation, exacerbating the problem in distributed systems or multi-server setups.
Common factors include:
- High MySQL/MariaDB latency.
- Unusual database settings.
- Distributed environment delays.
This issue is observed on select Hostmantis and Namecheap hosting accounts.
The issue manifests in
app\Traits\HasCustomShortflakePrimary.php, specifically at
private static $TIMEOUT = 1000;. Adjusting this value to
5000 might offer a solution for a specific environment, though it's not a guaranteed fix.
Consider the following approaches:
- Switch to a different hosting service.
SNOWFLAKE_ENABLED=false, then reinstall for standard ID usage.
- Use SQLite as it could provide a more efficient solution (refer to this article for more insights).
Additional Troubleshooting Tips
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.
Version Compatibility: Stay updated. Make sure you're utilizing the latest version of our script to benefit from the most recent patches and enhancements.
Logs: When things go wrong, logs are your best friend. Regularly check logs for detailed insights and error descriptions:
- PHP Error log
- Apache/Server log
Hosting Limitations: Keep in mind, some hosting services, especially shared ones, may impose restrictions that might not be apparent but can create issues.
File Permissions: Verify permissions for essential directories. Incorrect permissions may hinder certain operations.
Database Connectivity: Ensure database connection parameters are accurate and that the database server is operational.
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.
Documentation Reference: For diverse clarifications and additional guidance, always refer to our comprehensive documentation.