Open brettcs opened 7 years ago
Hmm, yeah, I can see how the clarity/obscurity of that error would be... debatable. The message does seem like a pretty accurate description of the problem, and I'm struggling to imagine a general error-handler/error-reporter which would make it clearer. (Unless you just handle it has a special-case specifically for Debian's Drupal package?)
Debian 8's drupal7 package splits the Drupal configuration into two files: a general
settings.php
file, which is owned root:root and has 0644 permissions, and adbconfig.php
file, which is owned root:www-data and has stricter 0640 permissions.settings.php
runsrequire_once('dbconfig.php');
.Unless you're running as the web server user
www-data
, trying to run civix with this configuration generates an error about failing to loaddbconfig.php
, and causes civix to fail:I addressed this problem on my system by giving my local user account read access to
dbsettings.php
.I know it's probably not possible to anticipate every possible problem that could occur while loading a user's CRM settings, but it might be nice if civix could notice that an error happened and explain a little more that this means it couldn't fully load the CRM configuration. Especially since this is Debian's stock configuration, it seems like this could be a common error for users to run into.