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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bulk Updating Location Information
Pages: [1]

Author Topic: Bulk Updating Location Information  (Read 1938 times)

dandaman

  • Guest
Bulk Updating Location Information
November 11, 2008, 03:12:55 pm
I imported a bunch of data while I did not have a Map provider set up.  As a result, now all these locations are unmappable.  I expect that they'd be filled in if I edited and saved each one, but I'd rather not do that.  Is there a way to trigger calculation of all the empty locations somehow?

Thanks,

Dan

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: Bulk Updating Location Information
November 11, 2008, 03:17:59 pm

check: bin/UpdateAddress.php in your distribution. You can invoke it for your site using:

http://CIVICRM_ROOT/sites/all/modules/civicrm/bin/UpdateAddress.php?name=XXX&pass=YYY

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

dandaman

  • Guest
Re: Bulk Updating Location Information
November 12, 2008, 11:31:16 am
Lobo,

I'm on Joomla, so I'd assume that I'd want to go to this address:

http://CIVICRM_ROOT/administrator/components/com_civicrm/civicrm/bin/UpdateAddress.php?name=XXX&pass=YYY

And is XXX and YYY supposed to be my username and password to get into Joomla/CiviCRM?

When I did that, I get this error:

Console_Getopt: Could not read cmd args (register_argc_argv=Off?)

Any help would be appreciated.

Thanks,

Dan

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: Bulk Updating Location Information
November 12, 2008, 01:05:20 pm

from the command line shell, in civicrm's bin directory can you run:

$ php UpdateAddress.php  --name=XXX --pass=YYY

where XXX and YYY are the name and password of a user with admin privileges

thanx

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

axlroach

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
Re: Bulk Updating Location Information
October 05, 2009, 02:02:27 pm
I'm having the same problem attempting to run UpdateAddress.php (except with drupal, not joomla).  I've tried from the browser and from the command line as lobo suggested.  I get the 'Console_Getopt: Could not read cmd args (register_argc_argv=Off?)' error in both cases.

Any suggestions?

Thanks,
aj

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Bulk Updating Location Information
October 16, 2009, 10:39:58 pm
Quote from: axlroach on October 05, 2009, 02:02:27 pm
I'm having the same problem attempting to run UpdateAddress.php (except with drupal, not joomla).  I've tried from the browser and from the command line as lobo suggested.  I get the 'Console_Getopt: Could not read cmd args (register_argc_argv=Off?)' error in both cases.

More info (same problem): if I replace "UpdateAddress.php" with "CiviMailProcessor.php" it runs fine (in browser window or via wget) so I know I have the 'name=...&pass=...&key=...' part right.

This is CiviCRM v2.2.8 - upgrade not possible at this time :(

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: Bulk Updating Location Information
October 16, 2009, 10:49:37 pm

for some strange reason (legacy?) UpdateAddress.php is a cmmand line script:

% php UpdateAddress.php  --name=NAME --pass=PASS --key=KEY

i think we did this to avoid timeouts (or it was a one time script etc)

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

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Bulk Updating Location Information
October 16, 2009, 11:17:50 pm
Thanks for the quick response!  But running from the command line didn't work for me right off (need to add HTTP_HOST=... in front of the command) and even after that I'm still getting the same error:
Code: [Select]
  <dd>
      Sorry. A non-recoverable error has occurred.      <p></p>
    <hr style="solid 1px" />
    <p>Console_Getopt: Could not read cmd args (register_argc_argv=Off?)</p>
      <p><a href="https://qa.ejusadb.org/" title="Main Menu">Return to home page.</a></p>
  </dd>

Also, the documentation is confusing as it implies calling UpdateAddress.php via URL as with the others: http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration

Of course, rather than fix the doc, the better solution is to fix the script, as putting the password and key into the bash history is not such a good idea.  I'll take a look at it this weekend, but I'm not guaranteeing anything (my PHP coding is limited, but I may be able to copy from other examples...)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bulk Updating Location Information

This forum was archived on 2017-11-26.