Answers.Body: <p>I was just dealing with this and found your question..</p>
  
  <p>Since you used <code>C:\</code>, i'll assume you're in windows.</p>
  
  <p><strong>TLDR;</strong> Try checking your PHP environment variable for 'HOMEPATH' vs 'HOME' and editing the file I mention below.</p>
  
  <p>The first thing I will say is that you can increase verbosity of errors in civix by using <code>-v</code>, <code>-vv</code>, or <code>-vvv</code> options for most verbose. It helped me a lot with this issue.</p>
  
  <p>I will leave the important details of my environment here as well, for others who may find this question:</p>
  
  <p>A working Drupal 7 + CiviCRM 4.7.17 locally installed (manually) with MAMP on a Windows 10 machine, configured to use PHP 5.6.28. MAMP is installed to <code>C:/MAMP</code> and the site root is <code>C:/MAMP/htdocs/drupal/</code></p>
  
  <p>Civix is installed to <code>C:/Users/"Eli Lisseck"/</code> and I am seeing the same behavior as you that civicrm:ping throws and exception.</p>
  
  <p>Running the more verbose command <code>civix civicrm:ping -vvv</code> led me to the file <code>C:\Users\Eli Lisseck\civix\vendor\civicrm\cv\src\Config.php</code> line 54.</p>
  
  <p>Check if it is looking for your HOME environment variable correctly, versus what you have under environment variables when you run <code>php -i</code>. I found it was only looking for 'HOME' but what existed was 'HOMEPATH'... so I added at line 52:</p>
  
  <pre><code>elseif (getenv('HOMEPATH')) {
        $file = getenv('HOMEPATH') . '/.cv.json';
        return $file;
      }
  </code></pre>
  
  <p>Now I get <code>civix civicrm:ping Ping successful</code></p>
  
  <p>Hope this is helpful!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T20:41:29.090Z
Answers.Text: perfect solution!
Answers.UserDisplayName: davejal
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-01T14:01:45.263Z
Answers.LastActivityDate: 2017-04-01T14:01:45.263Z
Answers.UserDisplayName: Eli Lisseck
Answers.Body: <p>I was about to take Eli's approach, but then I realized it is much simpler:</p>
  
  <ol>
  <li>close your current cmd shell/terminal;</li>
  <li>press <kbd>Win</kbd> + <kbd>R</kbd>, type <code>setx CV_CONFIG "%userprofile%\.cv.json"</code> and press <kbd>Enter</kbd>;</li>
  <li>reopen the shell, goto your project's directory and test with <code>civix civicrm:ping -vvv</code>.</li>
  </ol>
  
  <p>Alternatively, if you prefer to check/set environment variables for your account, <strong>run</strong>:</p>
  
  <ul>
  <li><code>%windir%\system32\rundll32.exe sysdm.cpl EditEnvironmentVariables</code></li>
  </ul>
  
  <h1>Why?</h1>
  
  <p>If you notice <code>civix\vendor\civicrm\cv\src\Config.php@getFileName()</code>, the first environment variable that it expects is <code>CV_CONFIG</code>, and when it doesn't find it, it will try <code>getenv('HOME') . '/.cv.json'</code>.</p>
  
  <p>Therefore, you can either set the new variable I mentioned above or just:</p>
  
  <ul>
  <li><code>setx HOME %userprofile%</code>.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-12T12:03:06.907Z
Answers.LastActivityDate: 2017-06-12T12:03:06.907Z
Answers.UserDisplayName: Armfoot
Answers.Body: <p>Shortcut to Eli's answer; just <code>civix civicrm:ping -vvv</code> and check for ...<code>\civix\vendor\civicrm\cv\src\Config.php</code>. If you find it, it means you need to change <code>HOME</code> to <code>HOMEPATH</code>.</p>
  
  <p>From</p>
  
  <pre><code>elseif (getenv('HOME')) {
    return getenv('HOME') . '/.cv.json';
  }
  </code></pre>
  
  <p>to</p>
  
  <pre><code>elseif (getenv('HOMEPATH')) {
    return getenv('HOMEPATH') . '/.cv.json';
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-16T08:58:38.487Z
Answers.LastActivityDate: 2018-10-16T08:58:38.487Z
Answers.UserDisplayName: Overcomer
Body: <p>I have installed civicrm and want to develop an extension.
  I installed civix for creating this extension but when i run <code>civix civicrm:ping</code> command in my civicrm folder, I get the following error:</p>
  <p><code>C:\xamp\htdocs\civicrm&gt;civix civicrm:ping</code></p>
  <blockquote>
  <p>[RuntimeException]</p>
  <p><strong>Failed to determine INI file path</strong>.</p>
  </blockquote>
  <p>How to solve this problem?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T06:19:35.753Z
Comments.Text: Is CiviCRM working in your browser? Did you install CiviCRM with civicrm-buildkit, or manually? What CMS are you using?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T17:12:56.627Z
Comments.Text: Yes it's working on my local host. Using Drupal. didn't install any buildkit, will do that on cent os server.
Comments.UserDisplayName: Farzoqe Khan
Tags: <error><civix><windows>
Title: Civicrm:ping INI file not found
ThreadText: # Civicrm:ping INI file not found
  
  (Asked by: username_0 on 2017-03-13)
  
  I have installed civicrm and want to develop an extension.
  I installed civix for creating this extension but when i run `civix civicrm:ping` command in my civicrm folder, I get the following error:
  
  `C:\xamp\htdocs\civicrm>civix civicrm:ping`
  
  > [RuntimeException]
  >
  > **Failed to determine INI file path**.
  
  How to solve this problem?
  
  **Tags:** error, civix, windows
  
  > **Comments:**
  > **username_1**: Is CiviCRM working in your browser? Did you install CiviCRM with civicrm-buildkit, or manually? What CMS are you using?  
  > **username_0**: Yes it's working on my local host. Using Drupal. didn't install any buildkit, will do that on cent os server.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-04-01. Score: 4
  
  I was just dealing with this and found your question..
  Since you used C:\, i'll assume you're in windows.
  TLDR; Try checking your PHP environment variable for 'HOMEPATH' vs 'HOME' and editing the file I mention below.
  The first thing I will say is that you can increase verbosity of errors in civix by using -v, -vv, or -vvv options for most verbose. It helped me a lot with this issue.
  I will leave the important details of my environment here as well, for others who may find this question:
  A working Drupal 7 + CiviCRM 4.7.17 locally installed (manually) with MAMP on a Windows 10 machine, configured to use PHP 5.6.28. MAMP is installed to C:/MAMP and the site root is C:/MAMP/htdocs/drupal/
  Civix is installed to C:/Users/"username_2"/ and I am seeing the same behavior as you that civicrm:ping throws and exception.
  Running the more verbose command civix civicrm:ping -vvv led me to the file C:\Users\username_2\civix\vendor\civicrm\cv\src\Config.php line 54.
  Check if it is looking for your HOME environment variable correctly, versus what you have under environment variables when you run php -i. I found it was only looking for 'HOME' but what existed was 'HOMEPATH'... so I added at line 52:
  elseif (getenv('HOMEPATH')) {
        $file = getenv('HOMEPATH') . '/.cv.json';
        return $file;
      }
  
  Now I get civix civicrm:ping Ping successful
  Hope this is helpful!
  
  > **Comments:**
  > **username_3**: perfect solution!  
  
  ---
  
  ### Answer by username_4 on 2017-06-12. Score: 2
  
  I was about to take Eli's approach, but then I realized it is much simpler:
  
  1. close your current cmd shell/terminal;
  2. press `Win` + `R`, type `setx CV_CONFIG "%userprofile%\.cv.json"` and press `Enter`;
  3. reopen the shell, goto your project's directory and test with `civix civicrm:ping -vvv`.
  
  Alternatively, if you prefer to check/set environment variables for your account, **run**:
  
  * `%windir%\system32\rundll32.exe sysdm.cpl EditEnvironmentVariables`
  
  # Why?
  
  If you notice `civix\vendor\civicrm\cv\src\Config.php@getFileName()`, the first environment variable that it expects is `CV_CONFIG`, and when it doesn't find it, it will try `getenv('HOME') . '/.cv.json'`.
  
  Therefore, you can either set the new variable I mentioned above or just:
  
  * `setx HOME %userprofile%`.
  
  
  ---
  
  ### Answer by username_5 on 2018-10-16. Score: 1
  
  Shortcut to Eli's answer; just civix civicrm:ping -vvv and check for ...\civix\vendor\civicrm\cv\src\Config.php. If you find it, it means you need to change HOME to HOMEPATH.
  From
  elseif (getenv('HOME')) {
    return getenv('HOME') . '/.cv.json';
  }
  
  to
  elseif (getenv('HOMEPATH')) {
    return getenv('HOMEPATH') . '/.cv.json';
  }
  
  
  ---
  
  