Cron error messages

Events happening in the community are now at Drupal community events on www.drupal.org.
Branjawn's picture

I keep getting this error message when running cron. I've spent a good amount of time researching but haven't found anything addressing bootstrap.inc specifically. Any insight?

<b>Warning</b>:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/focfouuo/public_html/includes/bootstrap.inc:1037) in <b>/home/focfouuo/public_html/includes/bootstrap.inc</b> on line <b>1037</b>

Can anyone tell I need a hack night soon?!?!? :)

Comments

Your cron shouldn't be

kwinters's picture

Your cron shouldn't be sending any output at all. Maybe you have some debug info being output?

Ken Winters

Cron Daemon

Branjawn's picture

thanks for the reply Ken. I'm not a computer science guy so sometmes I refer to things improperly. Let's see if this makes more sense:
I get an email from Cron Daemon each time cron is run. This is where the 'warning' message came from.

cron command

Branjawn's picture

Here's the command I run thru Cron Jobs on the CP...
/ramdisk/bin/php5 -q /home/focfouuo/public_html/cron.php

also, it isn't running all of the sudden. At least when I go to Status Report in Drupal it doesn't appear to be running. Other possibility is that the variable cron_semephore isn't being updated and cron is actually running. Do the little problems ever end!?!?

Oh, so it's not the Drupal

kwinters's picture

Oh, so it's not the Drupal cron that is generating the error? It's still the same problem, though: you are printing something to the screen too early, most likely a leftover debug statement.

Another possibility is that you're doing some work, outputting it to the screen, THEN trying to save something to the session. To fix you'll need to move the session start earlier.

Ken Winters

sigh

Branjawn's picture

Let's assume you are correct, I have no idea how to troubleshoot and fix. And being that I am volunteering to make this site for my church, I can't pay someone to help me. I mean, I could, but I don't even have a job right now :P

HACK NIGHT!!!!! someone schedule one soon! Impromptu tonight anyone??

Hack Night

afreeman's picture

Do you have any custom code on the site that's implementing hook_cron()? Any edits to cron.php?

Not that I know of

Branjawn's picture

The only custom code is in themes: page-*.tpl.php files and a "header" file called focheader.php that I 'include' in the other tpl files.

Same erroe :( Warning:

superfedya's picture

Same erroe :(

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent in /home2/mysite/public_html/site/includes/bootstrap.inc on line 1037

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/mysite/public_html/site/includes/bootstrap.inc:1037) in /home2/mysite/public_html/site/includes/bootstrap.inc on line 1037

I use Boost module. Maybe after this?

Do you have any feeds being

Branjawn's picture

Do you have any feeds being imported/updated? If so, try disabling those and see if cron runs properly.

I'd recommend SuperCron module. You can arrange processes run during cron and see exactly where it is failing, if it's failing.

Did anyone have any luck with

pberge's picture

Did anyone have any luck with this yet?

I am seeing the exact same error. I tried removing any feeds that I had and the result is still the same.

I also installed SuperCron and all every process that runs during cron completes in 0 seconds and there is nothing in the output or exception columns.

Did you run each process in

Branjawn's picture

Did you run each process in Supercron? If so, instead, run cron manually from your status page and then go check Supercron and see if all the times are the same. I found that even though I could run each process individually in Supercron, FeedAPI was the stopping point (breaking point) when I would run cron in general.

Also, try moving things around there, you can change the order processes (hooks?) are called in cron run.

I eventually had to totally abort trying to import Google Calendar, it will not work. Instead I embedded an iframe on a page. Sucky solution, but it works enough for now.

Same problem to me.

silviucostiniuc's picture

Hello! Same problem to me. And I'm not using any hook_cron or other stuff. The cron executes correctly but when it sends the email it generates that warning regarding session start, etc etc. In fact it emails you the output of your script. Preety strange. Really ...

When the cron is run as a

kwinters's picture

When the cron is run as a user that can't write the the temp directory, you will often get a warning. Executing the cron via WGET rather than directly should fix this, if it's the case. You will also get a warning if you var_dump etc. before headers are sent.

There's normally an option to email the results of the cron to some email address at the top of the file. If you want to suppress this for just one cron entry, I think piping to /dev/null will handle it.

Ken Winters

Server side

feropluris's picture

Hi all,

I have the same problem and it is managed by the server where I configure the cron. I use a virtual server with Plesk and the email is sent from it. I hope it helps.


Feropluris.com
info@feropluris.com

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: