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) »
  • SOLVED: Cron - ERROR: Invalid username and/or password
Pages: [1] 2

Author Topic: SOLVED: Cron - ERROR: Invalid username and/or password  (Read 3004 times)

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
SOLVED: Cron - ERROR: Invalid username and/or password
July 09, 2014, 01:11:39 am
Been having trouble getting cron jobs setup... I get "ERROR: Invalid username and/or password". I've tried it both with a cron account I created with Administor privileges and with my own account. I can login to Wordpress and go to CiviCRM with both accounts. Tried it with a cron job calling the CLI as well as loading cron.php via an incognito browser. I had Wordfence installed, so thought maybe that was interfering.. but no luck with disabling that. Any suggestions on how to diagnose this issue?

Cron job CLI call:

Code: [Select]
php -q /home/user/public_html/domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.com -u cron -p complicatedpassword -e Job -a execute
Incognito browser call:

Code: [Select]
https://domain.com/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=cron&pass=complicatedpassword&key=longkeyphrase
* swapped out domain.com, complicatedpassword, and longkeyphrase from the real data
« Last Edit: July 15, 2014, 12:02:53 am by eliot »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 09, 2014, 05:34:03 am
Do you have any funny characters in your password, i.e. not letters and numbers?
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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 09, 2014, 06:23:02 am
Nope, checked on that.. just numbers and letters.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 09, 2014, 07:27:16 am
Did you try with http not https? With the wrong key to see if it notes 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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 09, 2014, 09:04:12 pm
Quote from: Hershel on July 09, 2014, 07:27:16 am
Did you try with http not https? With the wrong key to see if it notes that?

Same with http, and when I do the wrong key it says "ERROR: Invalid key value sent." That's good to know...

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 10, 2014, 04:53:17 am
Perhaps it's another plugin? Or a theme?
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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 10, 2014, 08:24:53 pm
Ok, this is fascinating. I disabled all of my plugins and switched to a stock theme. Then, I got a Wordfence error page that I had been locked out. But I had disabled Wordfence! On the Wordfence lockout page, it has a link to "Return to the site home page" ... and the link is not to this site, but to the main site that is on my host.

My hosting directory structure is like this:

public_html/ <<-- maindomain.com
public_html/subdomain1.com/   <<-- subdomain1.com
public_html/subdomain2.com/   <<-- subdomain2.com

So somehow CiviCRM's cron.php is actually trying to connect with the user database that maindomain.com uses instead of the subdomain1.com user database. I'm going to go look in the CiviCRM github to figure out how Cron.php loads the Wordpress connection.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 10, 2014, 08:49:36 pm
Sure enough. I used a username/password from maindomain.com instead of subdomain1.com where CiviCRM is installed. The cron script ran. Yikes!!!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 11, 2014, 04:41:11 am
Where is CiviCRM installed?
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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 13, 2014, 09:34:26 pm
Quote from: Hershel on July 11, 2014, 04:41:11 am
Where is CiviCRM installed?

public_html/subdomain1.com/wp-content/plugins/civicrm/

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 14, 2014, 03:15:25 am
and on the main domain it's not installed? and you are calling cron on the subdomain?
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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 14, 2014, 04:23:06 am
yes, that's correct on both.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 14, 2014, 04:25:02 am
I am entirely uncertain as to what the issue might be. Could well be that your situation is somewhat unique and the recommended course of action might be to try to debug the code and see what's happening.
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.

eliot

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Wordpress 3.9.1
  • MySQL version: 5.5.36-34.2-log
  • PHP version: 5.3.28
Re: Cron - ERROR: Invalid username and/or password
July 14, 2014, 04:34:42 am
Was afraid of that. :(

This is a pretty common directory structure for shared hosting, from what I've seen.

I just noticed in admin/setting/uf that the WordPress Users Table is set to "users". That's not what my table is called. It's "wp_subdomain1_users". But everything related to Wordpress users <-> CiviCRM contacts seems to functional well. (Except for Cron, obviously.)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron - ERROR: Invalid username and/or password
July 14, 2014, 04:37:40 am
Change that setting to wp_subdomain1_users and try cron again.
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] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • SOLVED: Cron - ERROR: Invalid username and/or password

This forum was archived on 2017-11-26.