I am not able to access my moodle website after having moved it from http://getamarks.com to http://managementlearning.net - which is on a different server.
What is the error?
Warning: require_once(/home/manageme/public_html/moodle/lib/../message/lib.php): failed to open stream: No such file or directory in /home/manageme/public_html/moodle/lib/messagelib.php on line 27
Fatal error: require_once(): Failed opening required '/home/manageme/public_html/moodle/lib/../message/lib.php' (include_path='/home/manageme/public_html/moodle/lib/pear:.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/manageme/public_html/moodle/lib/messagelib.php on line 27
Analysing the error
That line (27) in messagelib.php goes like this:
require_once(__DIR__ . '/../message/lib.php');
Here's the heart of the problem
Meaning that it is looking for and has failed to open the file lib.php in the message directory - and that file is actually there.
Why does Moodle say that it failed opening the file? ie Why does it say ...
No such file or directory in /home/manageme/public_html/moodle/lib/messagelib.php on line 27 which is referring to the file /home/manageme/public_html/moodle/lib/../message/lib.php which is actually not missing
The slash between message and lib seems to have gone away. However, the salsh is there in lin2 27 of messsagelib.php. Furthermore the exact same program is running okay on the original website.
What I have done
- Copied over the entire Moodle directory
- Copied over the entire MoodleData directory
- Changed the config.php file - updated database options, cfg->wwwroot, cfg->dataroot and also added a cfg->datadir entry (same as dataroot)
- Ran the Moodle Search And Replace tool - https://docs.moodle.org/35/en/Search_and_replace_tool
- Downloaded the database script and ensured that all records that used to point to directories on the old server are now pointing to the new server
Thank you for your help, everyone.