In some cases of 500 error’s you can see the following error from the Apache logs,

PHP Warning: Cannot modify header information – headers already sent by (output started at /home/iserversupport/public_html/testscript.php)

This error can be fixed by updating a custom .user.ini file.

Step 1.

Check for the custom .user.ini file. If there is no custom .user.ini file, you need to create one.

Step 2.

Open the custom .user.ini file and locate the line,

output_buffering = Off

# Please click here to see how to create custom .user.ini file

Step 3.

Change the line as follows,

output_buffering = On

The output_buffering is the module that prevents the execution of the body of a php function if it is used for editing.

This will fix the issue and your website will be back online after making this change.