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 »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Cron / CLI - Invalid username or pasword
Pages: [1]

Author Topic: Cron / CLI - Invalid username or pasword  (Read 1156 times)

LoneWolf367

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Wordpress 3.4.2
  • MySQL version: 5.1.65
  • PHP version: 5.3.16
Cron / CLI - Invalid username or pasword
October 08, 2012, 02:32:40 pm
I have been testing out CiviCRM for a while and we are finally about ready to do our first e-mail campaign.

When I try to run cron tasks from wget

Quote
wget -O - -q -t 1 'http://[SITE-URL]/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=[USERNAME]&pass=[PASSWORD]&key=[SECRE-KEY]'

It returns with the response:

Quote
        <div class="error" style="margin-top:30px;">
        <p>This plugin requires WordPress version 3.3.1 or newer. Please upgrade your WordPress installation or download an <a href="http://[WPORG]/extend/plugins/ultimate-tinymce/developers/">older version of the plugin.</a></p>
        </div>
        ERROR: Invalid username and/or password

I attempted to upgrade to 4.2.2 but could not even begin the upgrade process. Was throwing Smarty errors, cleared template_c which had no effect. Tried to hack the upgrade together which did solve this issue but opened many other cans of worms so reverted back until the next release.

I tried hunting around to see if I could just use my key value only and bypass user authentication. Maybe someone can point me to the right file to edit to make this happen?


Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cron / CLI - Invalid username or pasword
October 08, 2012, 04:29:37 pm

1. I would work on getting the site upgraded to 4.2.2 before trying to get cron.php working

2. seems like the error is from a different plugin? is that messing things up?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

LoneWolf367

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Wordpress 3.4.2
  • MySQL version: 5.1.65
  • PHP version: 5.3.16
Re: Cron / CLI - Invalid username or pasword
October 09, 2012, 04:30:25 pm
Thanks for the response!

I had removed the plugin but looks like it had some crumbs left over.

Now it's just returning

ERROR: Invalid username and/or password

I've tried creating an additional Wordpress administrator just to see if that work but to no avail :( Just got my first e-mail campaign out and that went smooth though so :) Will attempt to upgrade to 4.2.2 soon I suppose.

So in cron.php I have now bypassed authentication but it still requires the key... and still requires to pass SOME kind of value for username / pass so hopefully that doesn't open up any massive security holes. But.. fixed for now.

Commented out:
Quote
CRM_Utils_System::authenticateScript(TRUE);
« Last Edit: October 09, 2012, 04:37:59 pm by LoneWolf367 »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Cron / CLI - Invalid username or pasword
October 10, 2012, 01:04:48 am
Hi,

Not sure about the access rights on WP, but on drupal, the cron user needs to have access to civicrm.

Do you have "weird" chars on your login password? try first with a simple login/password (az09, no space, no / no & ...)

Being authenticated isn't only for security, but as well to set the current user so it's the owner when the cron job creates stuff, so might introduce problems in one of the tasks of one of the cronjobs

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Cron / CLI - Invalid username or pasword

This forum was archived on 2017-11-26.