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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Civimail Cron Error: Invalid username and/or password
Pages: 1 [2] 3

Author Topic: Civimail Cron Error: Invalid username and/or password  (Read 8452 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 09:32:05 am
Hi, you are probably running it from within the bin directory, you need to run it from your civicrm directory

(hence the php bin/civimail...)

I clarified the error message on the next version to avoid the confusion.

Quote from: shayaknyc on September 13, 2010, 07:00:10 am
Quote from: xavier on September 13, 2010, 06:48:13 am

Stab in the dark, as you seem to have shell access with php-cli:
cd civicrm root;
php5 bin/civimail.cronjob.php -u user -p password -s yoursite.org

X+

Ok....this is interesting...this is the error I got:

Code: [Select]
X-Powered-By: PHP/5.2.14
Content-type: text/html

<br />
<b>Warning</b>:  require_once(bin/cli.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/homepages/29/d100263672/htdocs/wsb3626572001/drupal-6.6/sites/all/modules/civicrm/bin/civimail.cronjob.php</b> on line <b>67</b><br />
<br />
<b>Fatal error</b>:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'bin/cli.php' (include_path='.:/usr/lib/php5') in <b>/homepages/29/d100263672/htdocs/wsb3626572001/drupal-6.6/sites/all/modules/civicrm/bin/civimail.cronjob.php</b> on line <b>67</b><br />

Hoping this means I'm on the road to debugging...... :D

--S

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

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 10:03:46 am
Quote from: xavier on September 13, 2010, 09:32:05 am
Hi, you are probably running it from within the bin directory, you need to run it from your civicrm directory

No, I was running it from: drupal/sites/all/modules/civicrm

I'm still getting those errors.

--S

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 10:12:10 am
Puzzled.

Does
/homepages/29/d100263672/htdocs/wsb3626572001/drupal-6.6/sites/all/modules/civicrm/bin/civimail.cronjob.php

exists ?

X+

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

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 10:47:30 am
Yep.

I'm puzzled too. Isn't this weird?!

Do you think it makes sense to just do a new drupal and civicrm install and then migrate the dbs?

*sigh* this is painful.....

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: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 11:02:16 am

Might want to debug the code here:

CRM/Utils/System/Drupal.php, function authenticate

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

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 11:08:39 am
Quote from: Donald Lobo on September 13, 2010, 11:02:16 am

Might want to debug the code here:

CRM/Utils/System/Drupal.php, function authenticate


I'm sorry...I'm not sure I understand what that means....

--S

Leo

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 03:01:13 pm
Not sure if this is relevant, but I was getting the same problem 'Incorrect Username/password'. I'd left the 'FIXME' account active, but just added a new one and marked it as default. When I deleted the 'FIXME' account, the errors went away.

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 13, 2010, 03:08:50 pm
Quote from: Leo on September 13, 2010, 03:01:13 pm
Not sure if this is relevant, but I was getting the same problem 'Incorrect Username/password'. I'd left the 'FIXME' account active, but just added a new one and marked it as default. When I deleted the 'FIXME' account, the errors went away.

I would love to reproduce your fix. Can you be a little more specific about what you did so I can try to do this myself?

THANKS!!!!

Leo

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
Re: Civimail Cron Error: Invalid username and/or password
September 14, 2010, 12:53:15 pm
Sorry, that's what happens when I post late at night, without thinking how it reads.

This may not be the same problem as you had, but;

I went to the 'Mail Accounts' list (In the menu 'Administer'/'CiviMail'/'Mail Accounts')
I deleted the unused account, which I had left there after I set my new one up.

When I added my account, I'd assumed that I didn't need to worry about leaving the old one there, as I'd marked my new account as the default one.

Once I'd deleted the unused account, my problem went away.

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 14, 2010, 02:21:38 pm
Hmm...yeah, that doesn't seem to be the problem. I only have one mail account set up, and it's set for the default, and the login credentials I set up there authenticate so.....I don't know.... *sigh*

It seems I'm sighing too much with this problem....

Thanks for the suggestion though!

--S

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Civimail Cron Error: Invalid username and/or password
September 16, 2010, 05:30:08 am
It seems that CiviCRM can’t find the relevant civicrm.settings.php file (and hence misses the right path in the include directories array).

Can you try creating a settings_location.php file in your CiviCRM root (one dir above bin) that looks like the following?

Code: [Select]
<?php
define
('CIVICRM_CONFDIR', '/var/www/drupal/sites');

(Where the CIVICRM_CONFDIR points to the right dir, of course).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 16, 2010, 06:21:52 am
Should CIVICRM_CONFDIR point to the full path to where the civicrm.settings.php file resides?

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 16, 2010, 09:53:53 am
Here's the content of my settings_location.php file (which is located in the CiviCRM root, one directory above the bin directory)):

Code: [Select]
<?php
define
('CIVICRM_CONFDIR', '/kunden/homepages/29/d100263672/htdocs/wsb3626572001/drupal-6.6/sites');

That didn't solve the problem, same error message.

I even tried this:
Code: [Select]
<?php
define
('CIVICRM_CONFDIR', '/kunden/homepages/29/d100263672/htdocs/wsb3626572001/drupal-6.6/sites/default/');

Which is where the civicrm.settings.php file resides. Nuthin.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civimail Cron Error: Invalid username and/or password
September 16, 2010, 10:15:38 am
We have tried quite a few different options to get it going, not sure what you are running anymore.

Could you describes again what you are running when you get these error messages ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Re: Civimail Cron Error: Invalid username and/or password
September 16, 2010, 10:40:59 am
Right now, my crontab entries are attempting to run the following command:

Code: [Select]
*/10    *       *       *       *       wget -O - -q -t 1 --post-data='name=cronuser&pass=PASSWORD&key=SITEKEY' http://www.atyourpalate.com/drupal-6.6/sites/all/modules/civicrm/bin/civimail.cronjob.php
I have a new user called cronuser with access to CiviCRM, CiviMail and Edit all Contacts. The password and key all use mixed-case alphanumeric scheme with no special-characters (allowed or otherwise).


« Last Edit: September 16, 2010, 10:46:44 am by shayaknyc »

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Civimail Cron Error: Invalid username and/or password

This forum was archived on 2017-11-26.