2

New installation of 4.7.14 into a WordPress 4.7 site located in a subdomain (e.g. sub.domain.com) hosted at A2. Everything good except for the "Cron Not Running". Created a new WP user with admin privileges, but still get "ERROR: Invalid username and/or password". Happens when trying to run from the command line as well.

php /home/me/public_html/sub.domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php -s sub.domain.com -u WP-user -p WP-password -e Job -a execute

What am I missing?

  • Progress! Using full path of /usr/bin/php got the error cli.php can only be run from command line. Using the hack at link I now get a bunch of html and then `<!-- W3 Total Cache: Minify debug info: Engine: disk Theme: 2fa4e Template: index --> /continued in next comment – Joe White Dec 16 '16 at 3:07
  • (final output) <!-- W3 Total Cache: Page cache debug info: Engine: disk: enhanced Cache key: gs.joewhite.com/_index.html Caching: enabled Creation Time: 0.005s Header info: X-Powered-By: PHP/5.5.38 Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT Expires: Fri, 16 Dec 2016 04:08:18 GMT Pragma: public Cache-Control: max-age=3600, public Etag: 64a26f9af5e9eb7cc1fa0a8df39c39cc --> Cron now running every 15 minutes, but still getting no cron runs have been recorded. – Joe White Dec 16 '16 at 3:12
  • Are you using the WP user nickname or email address? I set one of these up recently on WP and could only get it to work correctly with the email address of the cronuser, not the nickname/username. – Lesley Carter - BackOffice Jun 12 '17 at 16:35
  • I finally just wiped and reinstalled from scratch. Worked with the WP username: /path/to/php /home/me/public_html/sub.domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php -u username -p password -s sub.domain.com -e Job -a execute – Joe White Aug 5 '17 at 16:10
1

I'm not sure about this but it sounds like a permissions problem and you may need to update the permissions in root/wp-content/plugins/civicrm/civicrm/bin/cli.php to be executable. Hope this solves your problem.

  • Thanks for the suggestion, peterb. I had forgotten to fix those permissions when I reinstalled, but even with it set to 755 I still get ERROR: Invalid username and/or password when using the WP username; when using the same user's full email address, I still get Failed to login as [useremail] – Joe White Dec 14 '16 at 18:47
  • Would it be worth trying to move public_html after sub.domain.com in your cron command? – peterb Dec 15 '16 at 12:08
  • Thanks again, peterb, but /home/me/public_html/sub.domain.com/wp-content/plugins/civicrm/civicrm/bin/cli.php is the actual path. – Joe White Dec 16 '16 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.