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 »
  • Standalone Installations (Moderator: cap10morgan) »
  • Incorrect key for Cron Jobs
Pages: [1]

Author Topic: Incorrect key for Cron Jobs  (Read 7894 times)

mrengy

  • Guest
Incorrect key for Cron Jobs
February 18, 2009, 11:13:11 am
I posted this on the main forums, but no response yet. posting it here as well since I'm using standalone.

CiviMail isn't sending out scheduled mailings - I looked into Cron Jobs to get that going, but I'm having a problem with the key when trying to nudge the cron job with a link.

Here is the whole thread and my most recent post below:
Quote
I'm having a problem with the key for this as well.

I carefully followed the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration

And I edited the site key line in my civicrm.settings.php file to read:

define( 'CIVICRM_SITE_KEY', 'r0zsfYtC0PcEF\x^' );

and went to the URL: http://recycleabike.org/crm/bin/civimail.cronjob.php?key=r0zsfYtC0PcEF\x^

It still gave me the error: ERROR: You need to send a valid user name and password to execute this file.

Also, once before when I was trying a different site key, it gave a different error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/mikeeng/recycleabike.org/crm/standalone/civicrm.settings.php on line 148

At which point I checked around line 148, but didn't find anything immediately obvioiusly wrong there.

Thoughts?


Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Incorrect key for Cron Jobs
February 18, 2009, 01:13:10 pm
Hi,

I think this post is misleading. Your problem is just identifying the userID & password to feed in since you use OPENID. I don't know much about OPENID but obviously you need to somehow create a user with rights to send the mail and add it into that string.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

mrengy

  • Guest
Re: Incorrect key for Cron Jobs
February 18, 2009, 01:16:21 pm
Okay. I'm not sure if I need to change the URL to accept my OpenID or actually come up with a user name and password in its place and put that in the URL.

How does one create a user name and password with the rights to send from CiviMail?

cap10morgan

  • Moderator
  • I post occasionally
  • *****
  • Posts: 56
  • Karma: 9
Re: Incorrect key for Cron Jobs
February 18, 2009, 05:16:03 pm
Is this in the 2.2 beta?

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Incorrect key for Cron Jobs
February 18, 2009, 05:32:07 pm
I had problems with *any* special characters in the key value. Try creating one with just numbers and letters.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

mrengy

  • Guest
Re: Incorrect key for Cron Jobs
February 18, 2009, 09:06:42 pm
Thanks for the replies.

it's version 2.1.2.

And I tried using a key (changed it in the civicrm.settings.php file) that was only numbers and letters. Got the same error:
Quote
ERROR: You need to send a valid user name and password to execute this file

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Incorrect key for Cron Jobs
February 18, 2009, 09:19:26 pm
It's not a preferable solution, but you could disable the user/pwd authentication for the cronjob. In that file, there's an authenticateScript function called with "true" as the variable passed. Change it to false. Not sure if you still need the key.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

mrengy

  • Guest
Re: Incorrect key for Cron Jobs
February 18, 2009, 09:42:34 pm
Ah, well that's something for now. Thanks.

cap10morgan

  • Moderator
  • I post occasionally
  • *****
  • Posts: 56
  • Karma: 9
Re: Incorrect key for Cron Jobs
February 19, 2009, 08:38:25 am
Yes, for standalone 2.1, that's the actually the "official" way to do it. Definitely a hack, definitely not secure, but that's all we've got for now.

2.2 will be a slight improvement security-wise, but will still require setting an API key in the database manually. I'm planning to get a full OAuth implementation going for 2.3, or some other better system that is easier and secure.

If you'd like to help influence the direction it goes in 2.3, send me a message and we can talk about your requirements.

mrengy

  • Guest
Re: Incorrect key for Cron Jobs
March 25, 2009, 10:29:27 pm
Okay. I just upgraded to CiviCRM version 2.2 standalone.

Now I'm having the same problem I was having before when sending a mass e-mail through CiviMail.

I set the e-mail to be sent immediately, but it is still "scheduled" in the queue.

When I pointed my browser to http://recycleabike.org/crm/bin/civimail.cronjob.php, it told me, "ERROR: You need to send a valid user name and password to execute this file".

Any help with this one? thanks.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Incorrect key for Cron Jobs
March 26, 2009, 05:35:51 am
Did you disable the authorization requirement in civimail.cronjob.php?
Upgrading to v2.2 would have overwritten the change you previously made to that file. You have to reinstitute the modification.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

mrengy

  • Guest
Re: Incorrect key for Cron Jobs
March 26, 2009, 07:07:08 am
Ah that was it. Thanks for the reminder. I was looking in the wrong file (civicrm.settings.php) for that line.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Standalone Installations (Moderator: cap10morgan) »
  • Incorrect key for Cron Jobs

This forum was archived on 2017-11-26.