Community & Support

CRON works, but w/ bootstrap warning

i finally figured out how to turn on the cron process using CPANEL with my host. in fact, my aggregator feed is now updating hourly, so i know the thing is working; however, i am also getting a warning each time as follows:

<br />
<b>Warning</b>:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/home/login/public_html/class/includes/bootstrap.inc</b> on line <b>748</b><br />
<br />
<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/login/public_html/class/includes/bootstrap.inc:748) in <b>/home/login/public_html/class/includes/bootstrap.inc</b> on line <b>748</b><br />

----------
i searched forums for a solution, but none matched this warning and nearly all the other bootstrap errors claimed that the cron was failing . . . mine is not failing -- i just get an hourly email revealing the warning.

i opened bootstrap.inc, but i don't really know what to do to fix the warning.

Comments

Cron.php error

I'm also getting the exact same errors!

I'm using CPanel with Drupal 4.7.3. Cron works because search works but I get the same errors!

Is anyone else getting this?

Line 748: case

Line 748:

case DRUPAL_BOOTSTRAP_SESSION:
require_once './includes/session.inc';
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
line 748 -------------session_start(); -----------> Line 748
break;

Perhaps another session had already started somewhere in session.inc?

I went in and commented out line line 748, //session_start(), I ran cron and didn't receive any errors. But when I commented out line 748 in the bootstrap.inc file, there were error messages all over the site. But no error messages in cron.

Hmmmmm....

Cron in Cpanel

This is the command I'm using to run cron in CPanel:

php -q /home/myfolder/public_html/cron.php

I got it to work without the errors

It works without the errors if I omit the -q option.

php /home/myfolder/public_html/cron.php

Depending on your hosting prodiver, you might have to replace the "php" at the beginning with a wget or another command.

I got it to work without the errors

It works without the errors if I omit the -q option.

php /home/myfolder/public_html/cron.php

Depending on your hosting prodiver, you might have to replace the "php" at the beginning with a wget or another command.

I am on HostPapa and

I am on HostPapa and couldn't figure out why cron wasn't running successfully for me.

I was using the following command: get www.mydomain.com/drupal/cron.php

Here's what fixed it for me: wget www.mydomain.com/drupal/cron.php

As the previous commenter suggested, try wget if get doesn't work for you. FYI - I am using CPanel.

And this is what worked for

And this is what worked for me in case it helps any one . . .

cd /home/examplename/public_html/ ; php cron.php

but this didn't work

cd /home/examplename/public_html/cron.php

No idea why, must be quite unique to the host server

This worked...

This worked for me

cd /home/CPANELUSERNAME/public_html; php cron.php

Hostgator cron

cron.php on hostgator:
wget www.mysite/cron.php works!
note: I use multisite install, on 4 subdomain with symbolic links to main install
cd /home/CPANELUSERNAME/public_html/subdomanin; php cron.php doesn't work! (with or without -q)
but so one email cron alert is send for simultanously crons!
Thanks!