I would try
civix civicrm:ping -v
or even:
civix civicrm:ping -vvv
as the first thing as that could show something useful in the future.
civix will fail silently if your civicrm.settings.php file:
- is turning down phps error reporting and it hits an error
- contains a
die
orexit
command
I tracked down my problem as follow (your problem is most likely to be different but hopefully the the approach is helpful).
I started inserting this line liberally through my settings file to confirm I was looking at the correct file and to see where it was getting to by watching the output:
echo 'got here! #'.__LINE__.' '. __FILE__."\n";
Eventually I figured out the problem as here:
// civicrm.settings.php
// set up php debug and internalto servershow constanterrors:
if (isset($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'dev')) {
define('AGC_TEST_SERVER', true);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
}
else {
error_reporting(0);
// define('AGC_TEST_SERVER',<<< strstr($_SERVER['HTTP_HOST'],this 'box'));is bad if you cant find your problem!!
}
InsertInserting this in the else section confirmed that $_SERVER['HTTP_HOST']
was undefined:
echo '$_SERVER: '.json_encode($_SERVER,JSON_PRETTY_PRINT)."\n";
So I was able to correct this just by setting up a mock value in bash to fix my civicrm.settings.php logic, and also to allow Drupal to find the right sites/XXX/settings.php
file:
declare -x HTTP_HOST=contact-qld-dev1.myorg.example.com