Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8203

Running bin/civimail.cronjob.php from the command line isn't working in Drupal 7

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.0, 4.0.1
    • Fix Version/s: 4.0.3
    • Component/s: CiviMail
    • Labels:
      None

      Description

      Running bin/civimail.cronjob.php to send emails isn't working in Drupal 7 and CiviCRM 4. I think it's likely a Drupal 7 bootstrap issue. It still works fine using curl or wget though. Here is the output I got when trying it:

      PHP Notice: Undefined index: REMOTE_ADDR in /home/micah/projects/drupal-7.0/includes/bootstrap.inc on line 2597
      PHP Notice: Trying to get property of non-object in /home/micah/projects/drupal-7.0/modules/dblog/dblog.module on line 144
      PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO

      {watchdog}

      (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array
      (
      [:db_insert_placeholder_0] =>
      [:db_insert_placeholder_1] => php
      [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file).
      [:db_insert_placeholder_3] => a:6:

      {s:5:"%type";s:6:"Notice";s:8:"!message";s:28:"Undefined index: REMOTE_ADDR";s:9:"%function";s:12:"ip_address()";s:5:"%file";s:54:"/home/micah/projects/drupal-7.0/includes/bootstrap.inc";s:5:"%line";i:2597;s:14:"severity_level";i:5;}

      [:db_insert_placeholder_4] => 5
      [:db_insert_placeholder_5] =>
      [:db_insert_placeholder_6] => http://cividev7/bin/civimail.cronjob.php?bin/civimail.cronjob.php
      [:db_insert_placeholder_7] =>
      [:db_insert_placeholder_8] =>
      [:db_insert_placeholder_9] => 1306360655
      )
      in dblog_watchdog() (line 155 of /home/micah/projects/drupal-7.0/modules/dblog/dblog.module).

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              micah Micah Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: