cPanel Hosting Guide: Understand HTTP Error 500 and Enable display_errors for Troubleshooting
Table of Contents
- Service Direction / Introduction / Scope
- Service Transparency
- Definitions
- What Does HTTP Error 500 Mean
- Step by Step: Enable display_errors in cPanel PHP Selector Options
- How to Use the Displayed Error to Fix the Issue
- Common Mistakes
- FAQ
- Use Case
- Summary
Service Direction / Introduction / Scope
This article explains what HTTP Error 500 means on cPanel hosting and how to troubleshoot it by enabling display_errors in cPanel using PHP Selector Options. It helps you quickly reveal the real PHP error message so you can fix the correct file, plugin, or setting.
Scope includes common PHP websites such as WordPress, Joomla, and custom PHP applications hosted on cPanel.
Service Transparency
HTTP Error 500 is a general server side error. It means the web server could not complete the request, but the error page does not show the exact reason.
On shared hosting, common root causes include PHP fatal errors, plugin or theme conflicts, broken .htaccess rules, incorrect file permissions, or PHP version incompatibility. Enabling display_errors helps reveal the underlying PHP error on screen for faster troubleshooting.
Security note: display_errors should be enabled temporarily only. After you identify the issue, please turn it off to avoid exposing internal file paths and code details to the public.
Definitions
HTTP Status Code is a response code returned by a web server to show the result of a request.
Error 500 means Internal Server Error, a server side failure that prevents a normal response.
PHP Fatal Error is a critical PHP failure that stops script execution and often causes Error 500.
display_errors is a PHP setting that prints PHP errors directly on the webpage.
PHP Selector is a cPanel tool where you select PHP version and configure PHP options.
What Does HTTP Error 500 Mean
Error 500 usually happens when the server encountered a problem that stopped it from completing your request. In many cases, the server cannot show details because error output is disabled by default for security.
Common causes include the following items.
- PHP fatal error inside the website code
- Plugin, theme, or extension conflict
- Invalid rules in the .htaccess file
- Incorrect file or folder permissions
- PHP version mismatch, missing PHP extension, or outdated code
The best next step is to display the real PHP error message to identify the exact file and line that triggered the failure.
Step by Step: Enable display_errors in cPanel PHP Selector Options
- Login to cPanel
- Open Select PHP Version or PHP Selector
- Click the Options tab
- Locate display_errors
- Set display_errors to On
- Refresh the website page that shows Error 500
After enabling this option, the website may show a detailed PHP error. That message is the most important clue for fixing the issue quickly.
How to Use the Displayed Error to Fix the Issue
When the error is displayed, focus on the following details.
- Error type such as Fatal error, Parse error, Uncaught Error, Allowed memory size exhausted
- File path showing where the error happened
- Line number showing the exact line that failed
Common error examples and typical actions.
- Allowed memory size exhausted means PHP memory is insufficient or a plugin is consuming too much memory. Increase PHP memory limit or disable the heavy plugin.
- Call to undefined function usually indicates PHP version mismatch or a missing PHP extension. Check PHP version and required extensions.
- Parse error usually indicates broken code due to a missing semicolon, bracket, or incomplete file edit. Revert the recent changes.
- Class not found often indicates missing dependency or a failed update. Reinstall or update the affected plugin or library.
After you apply the fix, refresh the page to confirm the website is back online. Then set display_errors back to Off to protect sensitive information.
Common Mistakes
- Turning on display_errors and forgetting to turn it off after troubleshooting
- Assuming Error 500 is always a server outage when it is often a code level issue
- Editing .htaccess without making a backup copy first
- Changing many settings at once and losing track of what actually solved the issue
- Ignoring the error message and repeatedly refreshing the page without fixing the root cause
FAQ
1. Why do I see Error 500 instead of a clear message
Most servers hide error details to protect security. A clear error message may expose file paths or system details, so it is disabled by default.
2. Is it safe to enable display_errors
It is safe for short troubleshooting, but it should not stay enabled on a live public website. Enable it only long enough to capture the error, then turn it off.
3. I enabled display_errors but still see a blank page or still see Error 500
This may happen when the error occurs before PHP can output the message, or when the issue is related to permissions or .htaccess. In that case, check the Error Log in cPanel and review recent changes.
4. Will changing PHP version fix Error 500
Sometimes yes. If the website code or plugins are not compatible with the current PHP version, changing PHP version to a compatible one can resolve the issue. Always update plugins and themes to support modern PHP.
5. What should I send to iCoreHosting support if I cannot fix it
Please provide the full error message shown after enabling display_errors, the affected URL, and what you recently changed. This helps our team diagnose faster.
Use Case
Scenario: A customer reports the website shows Error 500 after installing a new plugin or updating Joomla or WordPress.
Action: Enable display_errors in cPanel PHP Selector Options, then reload the failing page.
Result: The page displays a fatal error pointing to a specific plugin file and line number. The customer disables the plugin or updates it to a compatible version, then the website loads normally again.
Final step: Turn display_errors back to Off after confirming the website is stable.
Summary
HTTP Error 500 is a general server side error that often hides the real cause. On cPanel hosting, enabling display_errors in PHP Selector Options is a fast way to reveal the underlying PHP error message. Use the displayed file path and line number to fix the correct plugin, theme, code, or configuration, then disable display_errors again to keep the website secure.
