rackspace-orchestration-templates / drupal-single

Rackspace Heat template to deploy a single server with Drupal leveraging chef-solo
Apache License 2.0
1 stars 7 forks source link

running Drupal's cron.php via /usr/bin/php triggers PHP Notices to mail #13

Open jduhls opened 9 years ago

jduhls commented 9 years ago

cron daemon sending mail containing notices:

PHP Notice: Undefined index: REMOTE_ADDR in /var/www/vhosts/drupal/includes/bootstrap.inc on line 2901

I edited cron to use 'drush cron' instead of '/usr/bin/php cron.php' to execute drupal cron hooks.

jduhls commented 9 years ago

Hm. using 'drush cron' triggered '/bin/sh: 1: drush: not found'

jduhls commented 9 years ago

Found a solution. Had to provide env var PATH in crontab (see: http://dominiquedecooman.com/blog/run-drush-cron-crontab). I am now receiving emails like the following from my cron jobs:

Cron run successful. [success] There is new syndicated content from git.baronwebdev.com. [status] There is no new syndicated content from Baron News. [status] There is new syndicated content from Hacker News. [status] There is new syndicated content from Drupal Core Releases. [status] There is new syndicated content from Rackspace Status. [status]

jduhls commented 9 years ago

Added '-q' to suppress output to cron mail