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 CiviMember (Moderator: Deepak Srivastava) »
  • cron Member Update script problems
Pages: [1]

Author Topic: cron Member Update script problems  (Read 1640 times)

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
cron Member Update script problems
July 18, 2008, 12:02:54 pm
I am having a heck of a time getting a simple cron task to run and use the update script. It seems to be confused by the URL with the last string containing the username and password and I get results like "must have username and password" even though I've included it in the wget and curl statements. Can anyone send me the line from their cron so I can compare it to mine (below)?

Code: [Select]
wget http://www.domain.org/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?name=username&pass=password

This is my result:

Code: [Select]
HTTP request sent, awaiting response... 200 OK
Length: 40 [text/html]
UpdateMembershipRecord.php?name=cronjob: Permission denied
Cannot write to `UpdateMembershipRecord.php?name=cronjob' (Permission denied).
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

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 Member Update script problems
July 18, 2008, 12:26:20 pm

You will need to escape the & if running from the unix command prompt. the below should work

$ wget http://www.domain.org/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php\?name=username\&pass=password

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

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: cron Member Update script problems
July 18, 2008, 12:38:30 pm
Thanks Lobo! I'll give it a try.
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: cron Member Update script problems
July 22, 2008, 01:52:59 pm
It's running the script -- which is great. I still get the following error to my email, but as long as it is running, I can live with this!
Code: [Select]
UpdateMembershipRecord.php?name=name&pass=passwd: Permission denied

Cannot write to `UpdateMembershipRecord.php?name=name&pass=passwd' (Permission denied).
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: cron Member Update script problems
July 23, 2008, 10:44:13 am
I'm not an expert on this - but I think wget is trying to write the output messages from the script to that filename. I "fixed" this by adding single quotes around the URL:

$ 'wget http://www.domain.org/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php\?name=username\&pass=password'

However, I think it might make sense to add the "append to logfile" directive and point to a writeable directory on your server - so that you have a log of what happened when the script ran each time. This page gives some info on these options:

http://www.linuxmanpages.com/man1/wget.1.php

If you get a command line working that you like - would be great if you updated the doc on the wiki for this.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • cron Member Update script problems

This forum was archived on 2017-11-26.