Error 500 typically arises from two main causes:
- Errors in scripts (PHP code)
- Issues with hosting services
Error 500 is very common, and troubleshooting its cause should begin by checking the event log. The event log contains all errors that occur during script execution and displays their underlying cause.
To view the log, open the file via FTP or the file manager in your hosting control panel at the following path:
Viewing via FTP
/logs/error_log
Viewing via File Manager
Files -> Home Directory
/logs/error_log
Developer Tools
In your hosting control panel, each domain has a Developer Tools
sub-section where you can configure the PHP version, set up Git, and view Logs
.
Open Logs and in the filter, select only two parameters:
- Apache Errors
- Nginx Errors
Navigate to the page or website where the error occurs and check the log for new events. The cause of the error will be displayed there.
In some cases, such as when the database service is unavailable, a 500 error can also occur. This can be triggered both globally and locally, depending on the specific event.
Displaying Errors on the Website
You can also enable global error display directly on the website itself. This means all events found in the log will be shown on the page. To do this, open your PHP
settings and set the display_errors
option to On
.
By default, this option is disabled for security reasons, as errors can contain information that could be used to find vulnerabilities. While convenient during development, do not keep this option enabled permanently.
The log allows you to precisely understand the cause of the error and resolve it.