Tutorial

If you experience an error warning in Dolphin 7 or Dolphin 7.1 like: cannot modify header information - headers already sent by something you might try changing your output_buffer settings in php.ini or with an .htaccess file depending on your setup.

Here are a few examples of what you might see:

"header(): Warning, could not modify header information, headers already sent" message.)
Warning: Cannot modify header information - headers already sent by (output started at /home/your-account/public_html/inc/utils.inc.php:618) in /home/your-account/public_html/inc/design.inc.php on line 498
Warning: Cannot modify header information - headers already sent by (output started at /home/your-account/public_html/inc/design.inc.php:240) in /home/your-account/public_html/inc/design.inc.php on line 166

This can often be solved by switching output_buffering from Off to On, or vice versa On to Off. In Dolphin's case usually setting output_buffering to On is more likely to fix the problem.

You can use the following information to make the changes. Be sure to use the right section. If your host has php as CGI/Fast CGI follow the php.ini section. If your host has mod_php / Apache Handler follow the .htaccess section.


Fix Dolphin Header Error Warnings CGI/Fast CGI Section

If your host has PHP running as CGI/Fast CGI use php.ini to make changes.

It may look something like one of the following:
output_buffering = Off
output_buffering = On
output_buffering = 4096

If you have Dolphin installed in the main root directory/folder ie http://www.yoursite.com

Download and backup the main php.ini file for your site (yoursite.com/php.ini). If you don't have one you can either ask your host to generate one for you, or you can create one with notepad or a similar text editor. Just name it php.ini and upload it to your root directory/folder.

If your php.ini contains the line:
output_buffering = Off

Try changing it to:
output_buffering = On

If it says:
output_buffering = On

Try changing it to:
output_buffering = Off

If it contains a number like:
output_buffering = 4096

Try changing it to:
output_buffering = On

Or possibly change it to:
output_buffering = Off

Save the changes back to your hosting account.

You can check and verify that output buffer has changed in your Dolphin Administration Host Tools phpinfo area.

Additionally:
If your host uses suPHP / CGI be sure to check the following tutorial for details about how to use one php.ini file for all your web directories/folders instead of multiple php.ini files.
How to use 1 php.ini file for all directories with suphp


Fix Dolphin Header Error Warnings mod_php / Apache Handler Section

If your host has PHP running as Apache Module / Apache Handler use .htaccess to make changes.

You could try one of the following:
php_value output_buffering 0
php_value output_buffering 1
php_value output_buffering 4096

Or:
php_flag output_buffering Off
php_flag output_buffering On

If you have Dolphin installed in the main root directory/folder ie http://www.yoursite.com download and backup the main .htaccess file for your site (yoursite.com/.htaccess).

Then, open the Dolphin main .htaccess file (yoursite.com/.htaccess) and find:
<IfModule mod_php4.c>
php_flag register_globals Off
</IfModule>
<IfModule mod_php5.c>
php_flag allow_url_include Off
php_flag register_globals Off
</IfModule>

Add/update with output buffering code such as:
<IfModule mod_php4.c>
php_flag register_globals Off
php_value output_buffering 1
</IfModule>
php_flag allow_url_include Off
php_flag register_globals Off
php_value output_buffering 1
</IfModule>

Save the changes back to your hosting account.

You can check and verify that output buffer has changed in your Dolphin Administration Host Tools phpinfo area.

If you get a 500 error (Internal Server Error) then most likely you added it wrong or to the wrong area. Restore your backup .htaccess file and try again.

If you have a VPS or Dedicated server you can change the master php.ini file for the entire server from Off to On, or On to Off. After doing so don't forget to restart Apache.

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links