I am keep getting this msg when I create an simple png image by using GD..
"Warning: Cannot add header information - headers already ....."
Can any one help? urgent.
Regards, Elvis Please mail me a copy as well. Thanks too much!
The error has nothing to do with GD functions. You can not call function header after calling function echo or printf. Because calling echo causes one output. The function header needs no output before it is called. Obviously, it is a limit to output any messages at any time. I have found a method to change this case. In php.ini (only for PHP4.0) you can replace output_buffering=Off with output_buffering=On. This can allow any output at any time.
Elvis wrote:
: "Warning: Cannot add header information - headers already ....."
You are most likely outputing -something- to the browser before you send the mime type. Make sure that your script has absolutely no white space outside of your php tags (not even a blank line at the top) and that you are not print()ing or echo()ing anything before the header.
Hi Jonhson
I changed the output_buffering=on however, I still get a garbled pic
Can you help
OOzy