Answers.Body: <p>git and composer aren't necessary to install civix.  In the <a href="https://github.com/totten/civix/blob/master/README.md" rel="nofollow noreferrer">README</a> it suggests multiple ways to install civix.  The first one is a simple download: <a href="https://download.civicrm.org/civix/civix.phar" rel="nofollow noreferrer">https://download.civicrm.org/civix/civix.phar</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-13T09:42:43.163Z
Answers.Text: Thank you Jon. I have just installed (uploaded) civix.phar in my www/www directory, but when I want to run civix civicrm:ping (from www/www$, using PuTTY), I get civix : command not found. Did I forget something ?
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-13T12:49:46.420Z
Answers.Text: If you're using the .phar file and renamed it to `civix` then you either need to call `php civix ...` or use `./civix` or update your $PATH environment variable to include the full path to where you have downloaded civix.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-13T13:55:13.423Z
Answers.Text: Excuse-me, Demerit, but I am a bit lost (I am not a linux expert). I did not rename civix.phar (should I ?). I run my civix command from home/myhostname/www/www (which is the directory where I downloaded civix.phar). If I run php civix ... I get the following message : failed loading /usr/local/ioncube/ioncuble/ioncube_lin.1.so ... . If I run ./civix ..., I get the following message : ./civix : no such file or directory.(which is different from "command not found")
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-13T16:16:22.650Z
Answers.Text: Ok I assumed you renamed it. I answered your other post. The ioncube might be the version of command line php installed is mismatched so might need to type `php72` instead of php.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-14T02:18:01.277Z
Answers.Text: Ioncube is a sort of "copy protection" for commercial PHP programs.  I'm guessing this isn't your local computer, but rather a web host - who probably misconfigured their command line so it looks for Ioncube in a place it can't find it.  That's an issue to deal with your webhost about.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-14T09:42:23.920Z
Answers.Text: Thank you Jon ; I have just submitted the issue to my web hoster (CiviHosting). Waiting for an answer. I keep you informed.
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-15T10:21:37.867Z
Answers.Text: I have removed the ioncube line from my (hosted) php.ini file : then when I run php civix.phar civicrm:ping, I get no answer. I am waiting for CiviHosting answer.
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-16T12:34:14.027Z
Answers.Text: My hoster did some modifications related to the php-cli configuration, and it seems OK now. The actual command to run is : php civix.phar civicrm:ping (or php.cli civix.phar ...). Thanks again Jon.
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-12T16:05:38.063Z
Answers.LastActivityDate: 2019-09-12T16:05:38.063Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>Yes, you could also just create a folder with the name of your extension in the extension folder of CiviCRM, and code from there. But that requires you to understand the folder and file structure required for extensions so it will actually be easier with civix. It is not a prerequisite but it helps a lot!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-12T16:39:23.350Z
Answers.LastActivityDate: 2019-09-12T16:39:23.350Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I want to develop a very simple Extension which :</p>
  
  <ul>
  <li>searches the current contact_id</li>
  <li>then verifies if he is recorded for a given event (event_id as a parameter)</li>
  <li>then, depending on the result, echoes a message or opens an URL.</li>
  </ul>
  
  <p>I read that, to develop an extension, I first had to :</p>
  
  <ul>
  <li>install Civix,</li>
  <li>which requires installing first git and composer
  ... which seems very complicated to me for such a simple program.</li>
  </ul>
  
  <p>Is there a way to write and upload directly the code in the Extension directory, whithout all these prerequisites ?</p>
  
Tags: <extension>
Title: How to develop a very simple Extension
ThreadText: # How to develop a very simple Extension
  
  (Asked by: username_0 on 2019-09-12)
  
  I want to develop a very simple Extension which :
  
  * searches the current contact\_id
  * then verifies if he is recorded for a given event (event\_id as a parameter)
  * then, depending on the result, echoes a message or opens an URL.
  
  I read that, to develop an extension, I first had to :
  
  * install Civix,
  * which requires installing first git and composer
    ... which seems very complicated to me for such a simple program.
  
  Is there a way to write and upload directly the code in the Extension directory, whithout all these prerequisites ?
  
  **Tags:** extension
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-09-12. Score: 2 | Accepted answer
  
  git and composer aren't necessary to install civix. In the [README](https://github.com/totten/civix/blob/master/README.md) it suggests multiple ways to install civix. The first one is a simple download: <https://download.civicrm.org/civix/civix.phar>.
  
  > **Comments:**
  > **username_0**: Thank you Jon. I have just installed (uploaded) civix.phar in my www/www directory, but when I want to run civix civicrm:ping (from www/www$, using PuTTY), I get civix : command not found. Did I forget something ?  
  > **username_2**: If you're using the .phar file and renamed it to `civix` then you either need to call `php civix ...` or use `./civix` or update your $PATH environment variable to include the full path to where you have downloaded civix.  
  > **username_0**: Excuse-me, username_2, but I am a bit lost (I am not a linux expert). I did not rename civix.phar (should I ?). I run my civix command from home/myhostname/www/www (which is the directory where I downloaded civix.phar). If I run php civix ... I get the following message : failed loading /usr/local/ioncube/ioncuble/ioncube_lin.1.so ... . If I run ./civix ..., I get the following message : ./civix : no such file or directory.(which is different from "command not found")  
  > **username_2**: Ok I assumed you renamed it. I answered your other post. The ioncube might be the version of command line php installed is mismatched so might need to type `php72` instead of php.  
  > **username_1**: Ioncube is a sort of "copy protection" for commercial PHP programs.  I'm guessing this isn't your local computer, but rather a web host - who probably misconfigured their command line so it looks for Ioncube in a place it can't find it.  That's an issue to deal with your webhost about.  
  > **username_0**: Thank you Jon ; I have just submitted the issue to my web hoster (CiviHosting). Waiting for an answer. I keep you informed.  
  > **username_0**: I have removed the ioncube line from my (hosted) php.ini file : then when I run php civix.phar civicrm:ping, I get no answer. I am waiting for CiviHosting answer.  
  > **username_0**: My hoster did some modifications related to the php-cli configuration, and it seems OK now. The actual command to run is : php civix.phar civicrm:ping (or php.cli civix.phar ...). Thanks again Jon.  
  
  ---
  
  ### Answer by username_3 on 2019-09-12. Score: 1
  
  Yes, you could also just create a folder with the name of your extension in the extension folder of CiviCRM, and code from there. But that requires you to understand the folder and file structure required for extensions so it will actually be easier with civix. It is not a prerequisite but it helps a lot!
  
  
  ---
  
  