cv and civix blank output

Published: Jun 19, 2017

CiviCRM 4.6.4, Vagrant


Running cv vars:show outputs nothing
including adding -vvv
and civix civicrm:ping -vvv output is

[Bootstrap] Options: {
    "dynamicSettingsFile": "phar:///usr/local/bin/civix/vendor/civicrm/cv/settings_location.php",
    "env": "CIVICRM_SETTINGS",
    "prefetch": false,
    "settingsFile": null,
    "search": true,
    "cmsType": null,
    "httpHost": "",
    "output": {

    }
}
[Bootstrap] Find settings file
[Bootstrap] Load supplemental configuration for "/vagrant/mysite/wp-content/plugins/civicrm/civicrm.settings.php"
[Bootstrap] Load settings file "/vagrant/mysite/wp-content/plugins/civicrm/civicrm.settings.php"

Turns out that if my civicrm.settings.php has variables, wont work!

Example:

$wordpress_root = '/vagrant/mysite/';
$website_address = 'http://www.my.site/';

define( 'CIVICRM_UF_BASEURL'      , $website_address );

global $civicrm_setting;

// Temporary Files (System Settings > Directories)
$civicrm_setting['Directory Preferences']['uploadDir'] = $wordpress_root . 'wp-content/plugins/files/civicrm/upload' ;

// Images (System Settings > Directories)
$civicrm_setting['Directory Preferences']['imageUploadDir'] = $wordpress_root . 'wp-content/plugins/files/civicrm/persist/contribute' ;
Last modified: June 19, 2017 4:47 pm
Posted in: Snippets