On Fri, 26 Aug 2011, tamouse mailing lists wrote:
The log says what I said: Premature end of script headers <filename>
I put this into Google and got this:
http://htmlfixit.com/cgi-tutes/tutorial_Common_Web_dev_error_messages_and_what_they_mean.php#premature
As I understand it, the webserver is complaining that it did not get all
the headers it expected from the script before it terminated.
Given that you say this is for a cron job, the script may well be doing
exactly what you want it to do, but it's not outputting anything which is
why you get an error.
Presumably, you are calling this cron job with some process which runs the
PHP script through a URL on your webserver.
To fix this, I'd suggest one of the following. Either:
1. Modify the script so that it does actually output something, thereby
making the error go away.
or
2. Run the script directly with PHP instead of via your webserver. E.g.:
php -f <yourscriptname>
IMHO, 2 would be the better way to go if you can do this.
HTH,
Geoff.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php