Aside from 2.7 being old and why ...
5 moodle 2.7's in directories
What's above them all? A WordPress? Which PHP is / seeing?
The error ... undefined ... and the referrer looks like the 5 moodles in subdirectories are not seeing php 5.6. Whatever is on top of them using PHP 7 and not the PHP 5.6. Version 2.7 won't run under PHP 7.x
2019/06/17 16:45:11 [error] 7742#7742: *400 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: data in /path/to/moodle/installation/cache/stores/file/lib.php on line 370" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxx.xxx.xxx.xxx, request: "GET /xxx/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "xxx.xxx.xxx.xxx", referrer: "https://xxx.xxx.xxx.xxx/"
If the subdirectories are seen 5.6.x, then the following should show you that:
cd oneofthe2.7codedirs/
php -v
and/or
which php
Also, each moodle instance has it's own data directory - right?
Each moodle instance is running it's own cron job?
What happens, when in one of the 2.7's from the root of the code directtory you run:
php admin/cli/cron.php [ENTER]
or
php admin/cli/purge_caches.php
For that matter, if you are stuck running 2.7's, why have PHP 7 installed at all?
Your posting on StackOverFlow also shows something interesting ...
location /dataroot/ {
internal;
alias /var/www/html/lms-data/$rot-data;
}
Is apache root /var/www/html/ ... why would one put /lms-data/$rot-data in a web accessible directory on purpose?So in config of one of the 2.7's data directory has something like:
/$rot-data or what?
'SoS', Ken