Hi,
I set up a crontab but I'm getting this error message:

PHP Warning:  include_once(): Unable to access ./includes/bootstrap.inc in /var/www/vhosts/[mydomain]/subdomains/dev/httpdocs/cron.php on line 9
PHP Warning:  include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /var/www/vhosts/[mydomain]/subdomains/dev/httpdocs/cron.php on line 9
PHP Warning:  include_once(): Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:') in /var/www/vhosts/[mydomain]/subdomains/dev/httpdocs/cron.php on line 9
PHP Fatal error:  Call to undefined function drupal_bootstrap() in /var/www/vhosts/[mydomain]/subdomains/dev/httpdocs/cron.php on line 10

I'm not 100% sure if this should be considered a bug, I'm not even sure if creating an issue is the best way to find some help... but help is exactly what I need right now! Thanks.

CommentFileSizeAuthor
#10 cron.png15.67 KBvindesh
#8 cron.png40.18 KBpauljb

Comments

abqaria’s picture

Version: 5.7 » 5.14

I get the same problem

Do u have a solution ?

asimmonds’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Are you attempting to run cron.php via command line php? That method is not really supported unless you know how to configure the command line php environment properly. Please read http://drupal.org/node/117351 and http://drupal.org/cron for help on the supported method.

abqaria’s picture

thanks

ainigma32’s picture

@marcvangend: Were you able to resolve this issue as well?

- Arie

marcvangend’s picture

No, I went with poormanscron for that site.

ainigma32’s picture

Well as ling as it works right ;-)
If you're not going to pursue this any further, would you mind setting this issue to fixed?

- Arie

marcvangend’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'll close the issue, but I'm not setting it to fixed because the original problem was never solved.

pauljb’s picture

StatusFileSize
new40.18 KB

I had the same problem, with the same error messages:

this line in crontab fixed it:

cd /var/www/vhosts/mydomain.nl/httpdocs/ ; /usr/bin/php -q cron.php

Syph’s picture

Hi,

this is not my fix I found it a week or so back but cant find the author to give credit..

Make a new file called cron2.php and add this inside and upload to your http directory

<?PHP

$doc_root = dirname($_SERVER["SCRIPT_FILENAME"]);
chdir($doc_root);

include_once './cron.php';

?>

point your cron to this file and it will run your drupal cron

vindesh’s picture

Version: 5.14 » 6.26
StatusFileSize
new15.67 KB

I had the same problem, with the same error messages on godaddy.com hosting:

I have try crontab command and fixed it:

0-59 * * * * /usr/bin/curl http://www.mydomain.com/cron.php

running successfully for me...

vindesh’s picture

You can try another crontab command:

PHP command: use "php" or "/usr/bin/php"

php /var/www/vhosts/mydomain.com/httpdocs/cron.php
php -q /var/www/vhosts/mydomain.com/httpdocs/cron.php
cd /var/www/vhosts/mydomain.com/httpdocs/ ; /usr/bin/php -q cron.php
php /var/www/vhosts/mydomain.nl/httpdocs/cron.php &> /dev/null
php -q -f /var/www/vhosts/mydomain.com/httpdocs/cron.php

WGET command:
use "wget" or "/usr/bin/wget"

/usr/bin/wget http://www.mydomain.com/cron.php
wget http://www.mydomain.com/cron.php -O /dev/null
wget -O /dev/null www.mydomain.com/cron.php
/usr/bin/wget -O - -q -t 1 www.mydomain.com/cron.php
/usr/bin/wget http://www.mydomain.com/cron.php >/dev/null 2>&1

CURL:
/usr/bin/curl http://www.mydomain.com/cron.php

also see http://drupal.org/node/23714