Well, Sunday has produced only one change in the situation. Concentrating on my 2.4.11 installation, which is a clone of that which was running happily on the old server (same domain), I now get the following HTML page in my web browser:
<title>Error</title>
<p>Error: Database connection failed</p>
<p>It is possible that the database is overloaded or otherwise not running properly.</p>
<p>The site administrator should also check that the database details have been correctly specified in config.php</p>
</div></body></html>
I notice that this browser page is generated in Gill Sans font, which is clearly based on the modified .css files within my Moodle theme. So, something's working!
In other words, I'm now clearly getting beyond the $CFG error message, but I still cannot connect with the database.
My config.php is correct, and my permissions are correct. (db username and password correct; db name correct).
I tried moving the 'moodledata' folder to within public_html (with an .htaccess file in it), but that produces the same HTML message as above. So 'moodledata' is now back where it belongs.
Is it not most likely that the problem is with the server: perhaps some incompatibility with the versions of MySQL and/or PHP on the hosting server?
The versions are shown in cPanel as MySQL 10.0.23-MariaDB and PHP 5.6.17.
Do you see anything in the following server setup that might be causing problems with either Moodle 2.4.11 or Moodle 3.0.2?
| Apache Version | 2.4.18 |
| PHP Version | 5.6.17 |
| MySQL Version | 10.0.23-MariaDB |
| Architecture | x86_64 |
| Operating System | linux |
| Shared IP Address | 91.247.228.143 |
| Path to Sendmail | /usr/sbin/sendmail |
| Path to Perl | /usr/bin/perl |
| Perl Version | 5.16.3 |
| Kernel Version | 3.14.58-4.el7.lowsecurity.art.x86_64 |