0

Everything was working fine, and then we migrated our Civi installation to a new server. It still works fine, except that now, System Status insists that I haven't declared the following variables in the civicrm settings file:

  • CIVICRM_SMARTY_AUTOLOAD_PATH
  • CIVICRM_EXCLUDE_DIRS_PATTERN
  • CIVICRM_TEMPLATE_COMPILE_CHECK

Again, the site operates as expected, it's just the incessant nags that I can't make go away. In the server migration, the only thing that changed was that the files were put in a /chroot directory. It's as if when System Status goes looking, it's not finding the settings file, but otherwise, Civi is finding the settings file because the site runs as expected.

The network folks can't see anything wrong, neither can I. Except for this issue, the installation has been running just fine. Any advice would be appreciated.

SUMMARY: The variables are set and the System Status check is giving wrong results. Here's ISP response describing the chroot setup:

"The primary purpose of a chroot environment in InterWorx is to isolate each user’s environment from others on the same server. This prevents a user or process from accessing files or directories outside their assigned environment. By limiting access to certain parts of the file system, InterWorx can improve the security of shared hosting environments. Even if a user's account or process is compromised, the attacker is contained within the chrooted environment and cannot reach system-wide resources. The chroot directory effectively becomes the root (/) for that user or process. For example, a user may have access to /home/username, but they can't see or access directories like /etc or /var."

2 Answers 2

1

CIVICRM_SMARTY_AUTOLOAD_PATH lets you use the newer, preferred version of Smarty. CIVICRM_EXCLUDE_DIRS_PATTERN and CIVICRM_TEMPLATE_COMPILE_CHECK both improve performance on live sites.

These are fairly new settings and your system will run ok without them. The system checks should include links to documentation telling you how to update your civicrm.settings.php file.

It's not clear to me from your question whether you actually have those values set or not. If not, then just follow the documentation and add them. If they are set and the System Status check is giving wrong results then we need to know more about your chroot setup.

==Update==

The ISP's response describes the purpose of chroot (standard stuff), but not how it is implemented, particularly as regards the webserver.

If you look at the checks CIVICRM_EXCLUDE_DIRS_PATTERN CIVICRM_TEMPLATE_COMPILE_CHECK CIVICRM_SMARTY_AUTOLOAD_PATH the code does not directly look for civicrm.settings.php but checks for PHP constants that should have been set earlier. I'm not sure how chroot would affect that.

You may need to put in some additional logging to figure out what is going on. You could start by editing one of those checks and adding something like \Civi::log()->debug(print_r(get_defined_constants(), true)); to see what constants it does have at that point. (Don't post the output - it includes security info.)

2
  • They are set and the System Status check is giving wrong results. The ISP's response describing the chroot setup is too long for this comment so I will try and add the content of it to this thread some other way. Commented Oct 15 at 12:04
  • Ok, see updates to my answer.
    – Aidan
    Commented Oct 15 at 21:20
1

Thank you Aidan, your assistance enabled me to solve this mystery. Unbeknownst to me, this installation from long ago had 2 civicrm.settings files. I won't share the ridiculous location of the one that was being used. Gotta' love this business.

1
  • Ah - that would cause confusion!
    – Aidan
    Commented Oct 17 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.