Fix “headers already sent” PHP Error:

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.

If you need our help to fix any issues on your server. Please feel free to contact us, simply email to [email protected]

Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59 

[sep][/sep][button size=”large” color=”green” title=”Server Management from iServersupport” link=”http://iserversupport.com/cpanel-server-management/”]Server Management at just $59[/button]