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) »
  • civimail.cronjob.php Problem with Users Table
Pages: [1]

Author Topic: civimail.cronjob.php Problem with Users Table  (Read 649 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
civimail.cronjob.php Problem with Users Table
October 07, 2010, 03:24:10 am
I am using the civimail.cronjob.php posted by Xavier here which only has one line changed, and I am seeing an unusual error. When I first ran it I got:

Code: [Select]
SELECT u.* FROM users u WHERE LOWER(u.name) = 'civimail' AND u.pass = '4e8baf52aa2d1bcbbd766bce9d47e23d' AND u.status = 1 [nativecode=1146 ** Table 'xxxxx.users' doesn't exist]
I remembered that this Drupal site uses a prefix of default_ so I adjusted that at civicrm/admin/setting/uf?reset=1 and now I get

Code: [Select]
Site off-line

The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

The mysql error was: Access denied for user: 'xxxx_user@localhost' (Using password: YES).

when I run the URL for civimail.cronjob.php directly in the browser.

The rest of the site works fine, however, for both anonymous and logged on users--it's not really offline. :)

Any ideas how to rectify this?
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.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civimail.cronjob.php Problem with Users Table
October 07, 2010, 08:50:47 am
Hi,

Can you test if it's going into the cli or browser version ?

// you can run this program either from an apache command, or from the cli
if ( php_sapi_name() == "cli" ) {
  require_once ("bin/cli.php");

add a big die ("wrong place");

X+

P.S. Do you have a shell access on this server ? (check if the cli road works better)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: civimail.cronjob.php Problem with Users Table
October 07, 2010, 09:01:47 am
It's the right place when run from the browser:

Code: [Select]
if ( php_sapi_name() == "cli" ) {
die ("wrong place");
} else  { //from the webserver
die ("right place");
}

Running it via CLI, after I fixed the syntax and the location etc, it gives no output. Seems that it's running OK.
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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • civimail.cronjob.php Problem with Users Table

This forum was archived on 2017-11-26.