# HTTP ERROR 500: fixing PHP errors on your website

**URL:** <https://forum.infinityfree.com/t/http-error-500-fixing-php-errors-on-your-website/49352>\
**Category:** Websites and PHP\
**Created:** [March 26, 2020, 11:00pm UTC](https://forum.infinityfree.com/t/http-error-500-fixing-php-errors-on-your-website/49352 "2020-03-26T23:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [March 26, 2020, 11:00pm UTC](https://forum.infinityfree.com/t/http-error-500-fixing-php-errors-on-your-website/49352/1 "2020-03-26T23:00:00Z")

</div>

When you open your website, your browser may show a page saying **“This page isn’t working”** and **“is currently unable to handle this request”** with the error code `HTTP ERROR 500`. Some browsers show a blank page instead.

This means the PHP code of your website has crashed. The browser’s error page doesn’t tell you why, so the first step is to get the actual error message.

> **Seeing a “Something Went Wrong!” page instead?** That page is shown when your .htaccess file contains an error, not your PHP code. See [Fixing .htaccess errors (“Something Went Wrong!”)](https://forum.infinityfree.com/t/redirected-to-infinityfree-500-error-page/49354) instead.

## Step 1: Show the real error message

You can enable PHP error messages from the control panel:

1. Log in to your control panel.
2. Go to **Alter PHP Config**.
3. Select the domain you are trying to debug and click **Alter PHP Directives**.
4. Set **Display Errors** to **On** and click **Alter PHP Directives** to save.

Refresh the page on your website. You should now see an error message instead of the HTTP ERROR 500 page.

> **Turn Display Errors off when you’re done.** Error messages are shown to every visitor and can reveal file paths and other details about your website.

### Still no error message?

Your software may be hiding or capturing PHP errors itself, overriding the Display Errors setting. Check if it has a debug mode or a similar setting:

- **WordPress:** set `WP_DEBUG` to `true` in `wp-config.php`. See [Debugging in WordPress](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/).
- **Laravel:** set `APP_DEBUG=true` in your `.env` file. Set it back to `false` when you’re done, because Laravel’s debug page can expose your configuration, including passwords.

If your software has no such option, error suppression may be hard-coded in the PHP code. Look for lines like these:

```php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);

```

Commenting out these lines should make the errors visible. If you still can’t see any errors, please contact the developers of your software for help.

## Can I see the PHP error log?

No. Free hosting doesn’t keep PHP or web server error logs, so showing the errors on the page is the way to get them.

## Step 2: Fix the error

Once you have the error message, the next step is to fix it. There is no single process for this, but these steps solve most issues:

- **Check the file path in the error.** Does it point to a specific plugin or theme? Try disabling it to see if the error goes away. Updating or reinstalling the plugin, theme or script can help too.
- **Search the web for the error message** , together with the name of the plugin, theme or software causing it. Other people may have had the same error and found a solution.
- **Check the PHP version.** Errors like syntax errors or calls to undefined functions can mean your software needs a different PHP version than the one your site runs (see below).

## Which PHP version does my site use?

Create a PHP file containing `<?php phpinfo();` on your website and open it in your browser. This shows the PHP version your site actually runs. The version shown in the control panel doesn’t always match, so `phpinfo()` is the most reliable way to check. Remove the file when you’re done.

## Getting help

If you can’t find a solution, you can ask for help in the support channel of the plugin or theme causing the issue, on a general programming forum like Stack Overflow, or on the InfinityFree forum in the [Hosting Support category](https://forum.infinityfree.com/c/support/5). Please include the full error message in your question.

---

<div class="post-metadata">

**Author:** ![ChrisPAR](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/chrispar/32/8743_2.png) [@ChrisPAR](https://forum.infinityfree.com/u/ChrisPAR)\
**Post date:** [October 7, 2023, 12:49pm UTC](https://forum.infinityfree.com/t/http-error-500-fixing-php-errors-on-your-website/49352/2 "2023-10-07T12:49:35Z")

</div>

A post was split to a new topic: [My website displays HTTP Error 500](https://forum.infinityfree.com/t/my-website-displays-http-error-500/84062)
