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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Apparently invalid site key
Pages: [1]

Author Topic: Apparently invalid site key  (Read 1314 times)

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Apparently invalid site key
August 13, 2011, 06:04:07 am
Hi
I'm trying to run the EmailProcessor cron job.
If I put this URL in my browser
http://www.MYDOMAIN/administrator/components/com_civicrm/civicrm/bin/EmailProcessor.php?name=USERNAME&pass=PASSWORD&key=AKEY

it sort of works (it gives me an error message about JError classes not being found but appears to do what it should, as far as I can see).

However, I am trying to run it via the cron job with my webhost and to do that I've got to call a .php file which contains the following:

$emailProcessor = CIVI_BIN . 'EmailProcessor.php' . '?' . 'name=' . NAME . '&' . 'pass=' . PASS . '&' . 'key=' . CIVICRM_SITE_KEY;
system ('GET ' . $emailProcessor);

When I do that (or do that with the site key filled out longhand, rather than being included), I am told that
ERROR: You need to send a valid key to execute this file. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration

It does seem to be purely about the key element, because sending just
$emailProcessor = CIVI_BIN . 'EmailProcessor.php' ;
system ('GET ' . $emailProcessor);

(rightly) gives me an error about needing a username and password which go away (in favour of the site key error) when I supply them. Variables are therefore being passed to the script and being understood (same thing happens if I use the superuser, FWIW).

As I say, this isn't do with the include( ) statement to get CIVICRM_SITE_KEY as if I don't do that and have the whole thing filled out longhand it does the same thing. The site key is the same one as is in both the front and administrator civicrm settings files. It works if typed into my browser so the key does seem to work. What might it be about including it in the way I have that the script is either not getting it or not accepting it as valid?

Thanks.
« Last Edit: August 13, 2011, 06:09:41 am by EdP »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Apparently invalid site key
August 15, 2011, 12:59:48 pm
Not sure but perhaps you need :

Code: [Select]
system ("GET '" . $emailProcessor . "'");
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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Apparently invalid site key

This forum was archived on 2017-11-26.