This could be the result of several conditions/circumstances. If you provide a little more info, we could help you better.
1) What version of PHP are you running?
2) Is this a hand-coded application you have written, or are you having problems with a published package we can look at.
3) Sometimes a url for your site will let us look at what is happening and give us a clue.
There are some subtleties with PHP-CGI that couls have a bearing on this, for instance, check out this post: