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) »
  • Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
Pages: [1]

Author Topic: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password  (Read 2981 times)

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 10, 2013, 05:09:14 am
Hello.

I'm having difficulty getting the cron job to run so that CiviMail can send emails.

If I run the wget command on the URL:
http:// test.mysite.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=admin&pass=egabcdefghij&key=egabcdefghijklmn
I get the error:
ERROR: Invalid username and/or password

The site key is copied and pasted from civicrm.settings.php
The name and pass values are the site's administrator username and password.

Any suggestions?

I don't know if it's relevant but mailings are not sent but are left in the scheduled mailings queue but the scheduled time is one hour in the past – e.g., I try to send the email at 11:55 and it is scheduled for 10:55...

Thanks in advance.

Jake

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 10, 2013, 05:17:47 am
Are there any unusual characters (i.e. aside from letters and number) in the username or password? That can cause the URL not to work.
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.

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 10, 2013, 05:21:49 am
Thanks for your reply Hershel.

No, there are only letters and numbers in both the password and the site key...

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 10, 2013, 12:39:02 pm
Any other ideas? Or ideas as to how I might work out what's causing the problem?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 11, 2013, 01:57:24 pm
Try changing the username and password.

Or have someone review the URL for you and confirm the name/pass are actually correct.
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.

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 13, 2013, 03:14:18 am
Here's my full set of steps in case I'm missing something obvious:

1. I opened [FTP_SITEROOT]/wp-content/plugins/civicrm/civicrm.settings.php
and set
define( 'CIVICRM_SITE_KEY', 't3mppa55w0rd' );

2. I logged into the wordpress admin area and created a new administrator user called civiuser with password t3mppa55w0rd

3. I logged out and logged back in as civiuser, clicked on civicrm > mailings > new mailing, created a new mailing job and sent immediately.

4. Nothing happens

5. I direct my browser to
http://[SITE_ROOT]/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=civiuser&pass=t3mppa55w0rd&key=t3mppa55w0rd
and get the error
ERROR: Invalid username and/or password

6. I log back in to WP as civiuser, click on civicrm >administer > system settings > scheduled jobs, find "Send Scheduled Mailings", click more and execute now.

7. The job is exectued satisfactorily with the following log entry:

2013-05-13 10:40:35   Send Scheduled Mailings   
0
Summary
Finished execution of Send Scheduled Mailings with result: Success (a:0:{})
Details
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}
Full message:
Finished execution of Send Scheduled Mailings with result: Success (a:0:{})

2013-05-13 10:40:34   Send Scheduled Mailings   
0
Summary
Starting execution of Send Scheduled Mailings
Details
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}
Full message:
Starting execution of Send Scheduled Mailings

I wondered if it was a problem with permissions on cron.php but setting them at 777 and trying the url activation just resulted in a 500 error rather than an invalid username and/or password error.

Help!

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 13, 2013, 03:15:59 am
(Before anyone points it out, I have reset the CIVICRM_SITE_KEY and the civiuser password and permissions on cron.php :-)

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: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 13, 2013, 09:13:08 am

can u ensure that civiuser has all mailing and contact related civicrm permissions

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

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 14, 2013, 02:06:04 am
Thanks Lobo.

I've logged in to Wordpress as the civiuser, created and deleted contacts, and attempted to send a mailing.

If I need to set permissions explicitly somewhere can you give me some guidance as to where and how please?

Thanks again.

Jake

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 14, 2013, 03:10:38 am
after a little digging around I went to:
CiviCRM » Manage ACLs » Access Control » Assign Users to Roles
And checked:
ACL Role      Assigned to   Enabled
Administrator   Administrators    Yes

I also went to:
CiviCRM » Administer CiviCRM » Synchronize Users to Contacts
and made sure civiuser was imported to the CiviCRM database.

Finally I edited the civiuser contact and assigned it to the group "Administrators"

Still the same result.

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: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 14, 2013, 09:08:04 am

can u ensure the user has the permissions as specified here:

http://forum.civicrm.org/index.php/topic,27945.msg122162.html#msg122162

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

jakemc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.68
  • PHP version: 5.3.6
Re: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 14, 2013, 09:51:15 am
Thanks Lobo.

How do I do that?

In CiviCRM » Administer CiviCRM » Access Control » Wordpress Access Control it says "NOTE: Super Admin and Administrator roles will have all permissions in CiviCRM." and civiuser is an "administrator" within Wordpress and in CiviCRM is in the group "Administrators". Is there somewhere I need to explicitly set these permissions?

Jake

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: Setting up cron to enable CiviMail - ERROR: Invalid username and/or password
May 14, 2013, 09:56:22 am

permissions for wordpress came in the 4.3.x series

if civiuser is admin, then things should work. Not sure why its not. You'll need to get into the code and debug it and figure out whats happening and why. You'll need some amount of php expertise. you can ping folks on irc for help

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Setting up cron to enable CiviMail - ERROR: Invalid username and/or password

This forum was archived on 2017-11-26.