Answers.Body: <p>Even i have faced such problems many times in past. But i do some work around and fix it. What i would do</p>
  
  <ol>
  <li>rename file ImportData.php to WD2.php</li>
  <li>move WD2.php to org.civicrmitalia.washdog\api\v3\</li>
  <li>Use lower case as function name. <code>eg civicrm_api3_w_d2_importdata($params)</code></li>
  </ol>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-24T09:38:54.433Z
Answers.LastActivityDate: 2018-01-24T09:38:54.433Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Using civix I create an extension containing a new API (WD2.importdata).
  As result I obtained the file:</p>
  
  <p>..ext\org.civicrmitalia.washdog\api\v3\WD2\ImportData.php</p>
  
  <p>containing the following 2 functions:</p>
  
  <pre><code>function _civicrm_api3_w_d2_ImportData_spec(&amp;$spec) {
  }
  function civicrm_api3_w_d2_ImportData($params) {
  }
  </code></pre>
  
  <p>In my development server (Windows+Joomla+CiviCrm 4.7.25) the API is working properly. As I copied it in production server (Linux+Joomla+CiviCrm 4.7.25) both the API explorer and the Scheduled Jobs returns the error :</p>
  
  <p>error_message": "API (WD2, importdata) does not exist (join the API
  team and implement it!)</p>
  
  <p>I also tried to modify the function name in "_civicrm_api3_w_d2_importdata_spec(&amp;$spec)" or "_civicrm_api3_wd2_ImportData_spec(&amp;$spec)", without success.</p>
  
Tags: <api><error>
Title: API creation: my action is not found (only on Linux server)
ThreadText: # API creation: my action is not found (only on Linux server)
  
  (Asked by: username_0 on 2018-01-23)
  
  Using civix I create an extension containing a new API (WD2.importdata).
  As result I obtained the file:
  ..ext\org.civicrmitalia.washdog\api\v3\WD2\ImportData.php
  containing the following 2 functions:
  function _civicrm_api3_w_d2_ImportData_spec(&$spec) {
  }
  function civicrm_api3_w_d2_ImportData($params) {
  }
  
  In my development server (Windows+Joomla+CiviCrm 4.7.25) the API is working properly. As I copied it in production server (Linux+Joomla+CiviCrm 4.7.25) both the API explorer and the Scheduled Jobs returns the error :
  error_message": "API (WD2, importdata) does not exist (join the API
  team and implement it!)
  I also tried to modify the function name in "_civicrm_api3_w_d2_importdata_spec(&$spec)" or "_civicrm_api3_wd2_ImportData_spec(&$spec)", without success.
  
  **Tags:** api, error
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-24. Score: 1 | Accepted answer
  
  Even i have faced such problems many times in past. But i do some work around and fix it. What i would do
  
  1. rename file ImportData.php to WD2.php
  2. move WD2.php to org.civicrmitalia.washdog\api\v3\
  3. Use lower case as function name. `eg civicrm_api3_w_d2_importdata($params)`
  
  HTH
  
  Pradeep
  
  
  ---
  
  