When accessing the site, I receive a 500 Internal Server Error, a blank page, or PHP errors. How can I find details about the issue?
The well-known 500 error. For many users, it presents a major issue. In this article, you will find all the information you need.
There can be situations where, when accessing the site, the message 500 Internal Server Error, a blank page, or other messages that contain details about the encountered error (such as PHP errors) are displayed. These issues can generally be caused by:
- Errors in PHP syntax.
- Errors in the syntax of the
.htaccessfile.
To find out details about these errors, if the browser does not display them automatically, it is necessary to check the logs manually. Error logs can be accessed in the following ways:
- In the case of the cPanel control panel, error details are available in the Errors module in the Metrics section.
- In the case of the Webuzo control panel, details about errors are available in the Error Log module in the Server Info section.
If the above options do not provide enough information about the encountered errors, we need to consult the error_log file, which is usually found in the root directory of the site or the executed script. The error_log file can be accessed using the File Manager in the control panel or via FTP. In some cases, the error log may have a different name specified by the application, such as errors, exception_log, etc.
There may be situations where no errors are recorded in the error logs. In this case, we need to make sure that the following PHP directives are enabled:
- log_errors
- display_errors
In the case of cPanel, PHP directives can be configured by following the tutorials:
Additionally, we need to check if the application being used has the error display and logging functions enabled. These settings vary from one application to another and the specific documentation for each application must be consulted.