Pages

Welcome to My Blog

This is to share my IT experience with friends all around the world.
I have been working in Linux Fedora Systems for more than 8 years. Its fun to share knowledge and learn..
As everyone knows when a problem arises in your systems "googling" is the way that many depend on..

All the posts here are my working experiences during my working life.. So you can count on it..

I have added the references where I got help in solving IT issues


Sunday, June 17, 2012

Eleminate PHP Header Information Warning

In some instances we need to set header information inside the <body> section.
E.g. Redirecting to other page according to a condition.
Example code:
If ($a = "Yes")

header("location:ok.php"); 


It may gives a warning and code will stop at run time displaying a warning "Warning: Cannot modify header information - headers already sent by (output started at location) in /page on line xyz)"

Edit php.ini in your apache server and modify as "output_buffering = On"
To stop this warning and allow to add header information at to send header lines (including cookies) even after you send body content.