Answers.Body: <p>The main <code>civix</code> download is a PHAR archive. You can generally execute a PHAR archive directly, without extracting it, as described in the README:</p>
  
  <pre><code>sudo curl -LsS https://download.civicrm.org/civix/civix.phar -o /usr/local/bin/civix
  sudo chmod +x /usr/local/bin/civix
  </code></pre>
  
  <p>If it's a typical Debian/Ubuntu/RedHat server which you fully control, then putting the file in <code>/usr/local/bin/</code> is handy. However, this is not required: as far as <code>civix</code> is concerned, you can put the file in any folder with any owner. For convenience, add the folder to the <a href="https://cbednarski.com/articles/understanding-environment-variables-and-the-unix-path/" rel="nofollow"><code>PATH</code></a>.</p>
  
  <p>Note: Some server admins/distros set up their own funky rules (e.g. via <code>mount</code> options or <code>apparmor</code> or disabling PHP extensions whatever) -- this is especially true on shared hosting. Unfortunately, only you and your admin can determine these types of things.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-13T11:06:59.277Z
Answers.Text: I don't have access to /usr/local/bin/ - it's a virtual hosting. Any other ideas?
Answers.UserDisplayName: Somerussian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-13T17:46:33.810Z
Answers.Text: As far as civix is concerned, you can put the file in any folder with any owner. For convenience, add the folder to the PATH.
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-12T11:43:33.057Z
Answers.LastActivityDate: 2016-10-12T11:43:33.057Z
Answers.UserDisplayName: Tim Otten
Answers.Body: <p>Sounds like you need to re-read the instructions. On a whim, I'd guess that you don't actually need to write an extension, but if you are sure you do, you'll want to do it on a development machine, not your production machine, especially since you'll need command-line access. Your extensions directory is where you choose to create it, it won't be there automagically.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-12T04:33:42.987Z
Answers.Text: I have SSH access to my hosting, but I don't know where to put civix (or how to install it there). Any suggestions?
Answers.UserDisplayName: Somerussian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-12T17:48:45.280Z
Answers.Text: Tim's gone ahead and pasted in the relevant bit from the readme, but I'd re-iterate my first comment that you should start by reading the instructions, they are very straightforward, or ask questions about the bits you don't understand. You're also ignoring my advice that you shouldn't be doing this on your production machine.
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-11T18:59:39.307Z
Answers.LastActivityDate: 2016-10-11T18:59:39.307Z
Answers.UserDisplayName: Alan Dixon
Body: <p>I've installed civicrm on drupal site (on remote virtual hosting). And I need to create an extension for civicrm.
  As far as I know, civix is required for that. I've read <a href="https://github.com/totten/civix/" rel="nofollow">https://github.com/totten/civix/</a> but can't install civix. I've downloaded archive, extracted it and put to /sites/default/files/civicrm folder and it doesn't work.
  So where I have to place civix? Something else is reqired? Some executables or any other things?</p>
  
  <p>And the next question: how to generate module extension using that civix? I've read <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension" rel="nofollow">https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension</a> - there are some things that I can't understand, for example "/var/www/extensions" - I have no such path in my civicrm.</p>
  
Tags: <drupal><civix>
Title: Civix: how to install and generate a skeletal extension (drupal)
ThreadText: # Civix: how to install and generate a skeletal extension (drupal)
  
  (Asked by: username_0 on 2016-10-08)
  
  I've installed civicrm on drupal site (on remote virtual hosting). And I need to create an extension for civicrm.
  As far as I know, civix is required for that. I've read <https://github.com/totten/civix/> but can't install civix. I've downloaded archive, extracted it and put to /sites/default/files/civicrm folder and it doesn't work.
  So where I have to place civix? Something else is reqired? Some executables or any other things?
  
  And the next question: how to generate module extension using that civix? I've read <https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension> - there are some things that I can't understand, for example "/var/www/extensions" - I have no such path in my civicrm.
  
  **Tags:** drupal, civix
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-10-12. Score: 1
  
  The main `civix` download is a PHAR archive. You can generally execute a PHAR archive directly, without extracting it, as described in the README:
  
  ```
  sudo curl -LsS https://download.civicrm.org/civix/civix.phar -o /usr/local/bin/civix
  sudo chmod +x /usr/local/bin/civix
  
  ```
  
  If it's a typical Debian/Ubuntu/RedHat server which you fully control, then putting the file in `/usr/local/bin/` is handy. However, this is not required: as far as `civix` is concerned, you can put the file in any folder with any owner. For convenience, add the folder to the [`PATH`](https://cbednarski.com/articles/understanding-environment-variables-and-the-unix-path/).
  
  Note: Some server admins/distros set up their own funky rules (e.g. via `mount` options or `apparmor` or disabling PHP extensions whatever) -- this is especially true on shared hosting. Unfortunately, only you and your admin can determine these types of things.
  
  > **Comments:**
  > **username_0**: I don't have access to /usr/local/bin/ - it's a virtual hosting. Any other ideas?  
  > **username_1**: As far as civix is concerned, you can put the file in any folder with any owner. For convenience, add the folder to the PATH.  
  
  ---
  
  ### Answer by username_2 on 2016-10-11. Score: 0
  
  Sounds like you need to re-read the instructions. On a whim, I'd guess that you don't actually need to write an extension, but if you are sure you do, you'll want to do it on a development machine, not your production machine, especially since you'll need command-line access. Your extensions directory is where you choose to create it, it won't be there automagically.
  
  > **Comments:**
  > **username_0**: I have SSH access to my hosting, but I don't know where to put civix (or how to install it there). Any suggestions?  
  > **username_2**: Tim's gone ahead and pasted in the relevant bit from the readme, but I'd re-iterate my first comment that you should start by reading the instructions, they are very straightforward, or ask questions about the bits you don't understand. You're also ignoring my advice that you shouldn't be doing this on your production machine.  
  
  ---
  
  