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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • generate:api parameters.yml
Pages: [1]

Author Topic: generate:api parameters.yml  (Read 1231 times)

dlats

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.91
  • PHP version: 5.2.17
generate:api parameters.yml
February 27, 2013, 04:36:46 pm
I've copied the parameters.yml dist to parameters.yml and set the path to civicrm.settings.php

After generating a module and cding to that directory, I try civix generate:api xxxxxxxxxx yyy and get

"Cannot instantiate API client -- please set connection options in parameters.yml "

I've tried quoting the path, but same result. I'm running on Turnkey LAMP on my local network. Drupal-7.20 and civicrm 4.2.8 run fine.

Any suggestions?

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: generate:api parameters.yml
February 27, 2013, 08:24:55 pm
A few thoughts:
 * Make sure the path points to the directory (e.g. /var/www/sites/default) and not the file (e.g. /var/www/sites/default/civicrm.settings.php)
 * You can use the command "civix civicrm:ping" to test the connection. I don't think this will reveal any more information than you already get from "generate:api", but it's a little quicker to type and doesn't generate any files.
 * Creating/editing parameters.yml *should* work, but I don't recommend it anymore. At some point, I'd like to refactor and repackage as a single "civix" binary -- and parameters.yml won't work then. In anticipation of that, the suggested config is now to use "civix config:set" (which will write to ~/.civix/civix.ini).  There's some more notes at https://github.com/totten/civix/ under "Post-install Configuration, all operating systems". If you do it this way, then I'd suggest removing the localized parameters.yml.

dlats

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.91
  • PHP version: 5.2.17
Re: generate:api parameters.yml
February 28, 2013, 04:51:03 am
That work fine.

Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • generate:api parameters.yml

This forum was archived on 2017-11-26.