Skip to main content
simplify
Source Link
ErichBSchulz
  • 1.6k
  • 1
  • 9
  • 16

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 or exit 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

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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

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 or exit command

Eventually I figured out the problem as here:

// civicrm.settings.php
// set up php to show errors:
if (isset($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'dev')) {
  error_reporting(E_ALL | E_STRICT);
  ini_set('display_errors', TRUE);
  ini_set('display_startup_errors', TRUE);
}
else {
  error_reporting(0); // <<< this is bad if you cant find your problem!!
}              

Inserting 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
expand
Source Link
ErichBSchulz
  • 1.6k
  • 1
  • 9
  • 16

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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.devmyorg.boxexample.com

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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:

declare -x HTTP_HOST=contact-qld-dev1.dev.box

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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
expand
Source Link
ErichBSchulz
  • 1.6k
  • 1
  • 9
  • 16

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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:

declare -x HTTP_HOST=contact-qld-dev1.dev.box

I would try

civix civicrm:ping -v

or even:

civix civicrm:ping -vvv

as the first thing

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 or exit 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 internal server constant:
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'], 'box'));
}              

Insert 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:

declare -x HTTP_HOST=contact-qld-dev1.dev.box
Source Link
ErichBSchulz
  • 1.6k
  • 1
  • 9
  • 16
Loading