Hi all:
I set up a Cron Job on my host which runs /cron.php every hour. I now get these e-mails:
From: Cron Daemon [mailto:jewishce@web4.hivelocity.net]
Sent: Monday, November 07, 2005 10:00 AM
To: support@jewishcenter.org
Subject: Cron /usr/local/bin/php
/hsphere/local/home/jewishce/jewishcenter.org/cron.phpWarning: main(sites/default/settings.php): failed to open stream: No such
file or directory in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
642Warning: main(): Failed opening 'sites/default/settings.php' for inclusion
(include_path='.:/usr/local/lib/php') in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
642Warning: main(includes/database.inc): failed to open stream: No such file or
directory in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
643Warning: main(): Failed opening 'includes/database.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
643Warning: main(includes/session.inc): failed to open stream: No such file or
directory in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
644Warning: main(): Failed opening 'includes/session.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
644Warning: main(includes/module.inc): failed to open stream: No such file or
directory in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
645Warning: main(): Failed opening 'includes/module.inc' for inclusion
(include_path='.:/usr/local/lib/php') in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
645Fatal error: Call to undefined function: db_fetch_object() in
/hsphere/local/home/jewishce/jewishcenter.org/includes/bootstrap.inc on line
199
My host says:
Try setting your paths to be absolute. So for
includes/session.inc
for example make it
/hsphere/local/home/jewishce/jewishcenter.org/includes/session.inc
It seems odd that I would have to change the core code. I'm sure there's another solution.
(See also this other post where I had to change user.module for e-mail to work: http://drupal.org/node/34362)
Thanks in advance for any guidance.
--Dave
Comments
From the handbook
From the handbook:
http://drupal.org/node/23714
You need to call cron.php using wget, lynx or any other browser.
------------------
Gerd Riesselmann
www.gerd-riesselmann.net
Thanks
Thanks Gerd.
Can I change the command itself?
The Cron Job configured on my host executes this command:
/usr/local/bin/php /hsphere/local/home/jewishce/jewishcenter.org/cron.php
Can I change that so it runs wget or lynx? I didn't fully understand the related handbook instructions.
--Dave
It should be something like
It should be something like this:
fetch http://jewishcenter.org/cron.php
---
Audun Larsen
Responded with this error
Responded with this error via e-mail:
fetch: www.jewishcenter.org/cron.php: size of remote file is not known
0 bytes transferred in 0.0 seconds (0.00 Bps)
Should I use a wget command or...?
Thanks again for all help. It's much appreciated.
Try lynx
Try something like this:
/usr/local/bin/lynx -source http://www.jewishcenter.org/cron.php > /dev/null 2>&1
You may need to change the path to lynx, depending on your host.
This is what i use:
This is what i use:
fetch -o /dev/null -q http://domain.tld/cron.php
---
Audun Larsen
lkonsult.no
If all that doesn't work...
...because your provider disabled wget, lynx, curl and related (like mine did), try http://www.webcron.org/
Before that I used wget -q http://example.org/cron.php
------------------
Gerd Riesselmann
www.gerd-riesselmann.net
Crom Module
I had some problems with this and took the easy route out and used the poormanscron module. This makes life very simple but is probably not the long term solution.