CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • [solved] Error when starting cli.php from shell command line
Pages: [1]

Author Topic: [solved] Error when starting cli.php from shell command line  (Read 746 times)

damaxl

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
  • CiviCRM version: 4.1.2 DE
  • CMS version: Drupal 7.12 / 7.14
  • MySQL version: 14.12
  • PHP version: 5.2.6
[solved] Error when starting cli.php from shell command line
July 09, 2012, 05:52:44 pm
Hello,

today I tried to find out why mailings where not sent. I checked Administer > System Setting >Scheduled Jobs and saw, that jobs were not scheduled.

To get possible error messages, I started the jobs from the command line with ...

cd /var/www/drupal/sites/all/modules/civicrm
/usr/bin/php bin/cli.php -j -s default -u returnmail -p xxxxxxxx -e Job -a process_mailing

.. and got his ugly HTML error message that says: Sorry an unrecoverable error occured ... DB Error: no such table

To find out what table, I checked the MySQL tables against the tables of another system where cron jobs are running, but there were no differences.

Now I'm at an end, because I have not the slightest idea what this could be.

The configuration is Debian Squeeze, Drupal 7.14, CiviCRM 4.1.2
In another machine with the same configuration, cron jobs are running well. The only difference is, that this system was setup as a 4.1.2 version from the first day on and CiviCRM is installed in /var/www/drupal/sites/default/modules/civicrm.
The buggy system was upgraded to 4.0.5 about one year ago and upgraded to 4.1.2 a half year ago.

Any help appreceated. Thank you in advance.
« Last Edit: July 13, 2012, 08:36:25 am by damaxl »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when starting cli.php from shell command line
July 11, 2012, 10:36:10 am
Sounds like the upgrade may have failed. Can you load the URL for cron in the browser and see the message in more detail? If it has no more detail, then enable debugging first.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

damaxl

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
  • CiviCRM version: 4.1.2 DE
  • CMS version: Drupal 7.12 / 7.14
  • MySQL version: 14.12
  • PHP version: 5.2.6
Re: Error when starting cli.php from shell command line
July 11, 2012, 07:59:23 pm
Hello Hershel,

thank you very much for your response.

Submitting the URL in the browser shows nothing, even when debugging is set to on.
The URL I tried was: https://www.example.tld/sites/all/modules/civicrm/bin/cron.php?name=civimail&pass=mypw&key=mykey

But then I submitted it from the command line again and got a detailed error description:
 Database Errorcode: Table 'drupal.users' doesn't exist, 1146.
An that's definitely right, because the table names are prefixed by d7_

And now the question is, how can I tell CiviCRM that the Drupal table names are prefixed?
All descriptions I found are telling about the other way round, accessing CiviCRM from Drupal.

The whole error message:
Quote
Database Errorcode: Table 'drupal.users' doesn't exist, 1146

Additional Details: Array
(
    [callback] => Array
        (
            [ 0 ] => CRM_Core_Error
            [1] => handle
        )
    [co de] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] =>
SELECT u.*
FROM   users u
WHERE  LOWER(u.name) = 'civimail'
AND    u.status = 1
 [nativecode=1146 ** Table 'drupal.users' doesn't exist]
    [type] => DB_Error
    [user_info] =>
SELECT u.*
FROM   users u
WHERE  LOWER(u.name) = 'civimail'
AND    u.status = 1
 [nativecode=1146 ** Table 'drupal.users' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT u.*
FROM   users u
WHERE  LOWER(u.name) = 'civimail'
AND    u.status = 1
 [nativecode=1146 ** Table 'drupal.users' doesn't exist]"]
)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when starting cli.php from shell command line
July 12, 2012, 04:59:36 am
Visit civicrm/admin/setting/uf?reset=1# to set that.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

damaxl

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
  • CiviCRM version: 4.1.2 DE
  • CMS version: Drupal 7.12 / 7.14
  • MySQL version: 14.12
  • PHP version: 5.2.6
Re: Error when starting cli.php from shell command line
July 13, 2012, 08:35:52 am
Hello Hershel,

everything is running now like a charm!
Thank you very much. I wouldn't have fixed this without your help!

Greetings from Bavaria

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • [solved] Error when starting cli.php from shell command line

This forum was archived on 2017-11-26.