This error means that your script does't write correct HTTP header (mostly because it's terminates before writing any header).
Possible reasons:
But you said it does't helpprint "Content-Type: text/plain\n\n";
So one way to find the problem is try to run your script at shell and show us script output. It will be perfect if you run script from your webserver user account.
In reply to Re: a classic : 'Premature end of script headers' problem
by Gangabass
in thread a classic : 'Premature end of script headers' problem
by hmbscully
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |