Error Assessing My Core Admin Functions

Error Assessing My Core Admin Functions

by GrowthWays Africa -
Number of replies: 26

Hello Moodler,

Trust we are keeping safe!

I am using Moodle 3.9 and today I noticed that all my core site admin functions under site administration such as: site administration, site information, plugins, appearance, serve, development, etc. And when I click any of these, I get an error message saying: 

Sorry, the requested file could not be found. This is a new development as I have not had such errors before now.

Would appreciate any insights on resolving this.

Thanks

Average of ratings: -
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

So 404 errors ... not found.   Right?

Using whatever tool you have outside of moodle code directory to browse files, see what is in moodlecode/admin/ on your server.

In looking at a moodle39 code/admin/ directory one should see the following files/directories:

admin_settings_search_form.php
antiviruses.php
auth.php
auth_config.php
blocks.php
category.php
classes
cli
contentbank.php
courseformats.php
cron.php
customfields.php
dataformats.php
editors.php
enrol.php
environment.php
environment.xml
filters.php
index.php
lib.php
localplugins.php
lock.php
mailout-debugger.php
media.php
message.php
mnet
modules.php
oauth2callback.php
phpinfo.php
plagiarism.php
plugins.php
portfolio.php
process_email.php
purgecaches.php
qbehaviours.php
qtypes.php
registration
renderer.php
reports.php
repository.php
repositoryinstance.php
resetemoticons.php
roles
search.php
searchareas.php
searchreindex.php
settings
settings.php
tasklogs.php
templates
testoutgoingmailconf.php
tests
thirdpartylibs.php
timezone.php
tool
tools.php
updatesetting.php
upgrade.txt
upgradesettings.php
user
user.php
webservice

And, the only way one sees moodle admin (Site Administration menu) is when one logs in as an admin level user.  You are logged on as an admin user, right?

You've a WordPress on same server and acting as the store front for courses in your 'academy'?   Been doing anything in WP?

In your config.php file, is there a line like:

$CFG->admin     = 'admin';

'SoS', Ken


In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Hello Ken,

Thanks for your response

No the error says "Sorry, the requested file could not be found" - see attached

Yes I am logged in as admin user

Yes, I have WordPress on same server and acting as the store front for courses in your 'academy' and been working with WP

Yes, there is a line like $CFG->admin = 'admin'; in my config.php file,

Thanks


Attachment scrnsht.png
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Did you do as I asked?  Did you look to see if the files and folders are there with a tool that allows you to browse files on your server?  Hint: use your cPanel File browser (know you have cPanel due to cert for site ... says so!).

A curl -I (just information) test of your url to the front page of your moodle renders this:

HTTP/1.1 406 Not Acceptable so what sort of web application firewall might your site be running?

Your site is using fordson theme - that compat with your 3.9.x site?

So let's try adding a few more lines to config.php

$CFG->theme='boost'; (or classic)

$CFG->siteadmins='2,youruseridnumber';

Files/Folders in code just don't go missing on their own! :|

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Hi Ken,

Yes, I can browse files on my server

Yes, my site is compactible with 3,9x, in fact I have two other Moodle sites on the same wordpress hosting account that are not giving any issues - I have full admin access to these two other Moodle sites

Added the line to my config.php file, but got an error
Many Thanks
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

"Yes, I can browse files on my server"

I take it that means the files and folders are there in the site that has issues.

So we have 3 moodle sites along with one WP.  Are they all 3.9.x?

Does each moodle site have it's own DB, it's own moodledata, and it's own code?   Are they by different domain names?

I suggested adding 3 lines to config.php.   Did you do all 3?

Moodle is very sensitive about the format of lines in config.php.   You should have added those lines above this one:

require_once(__DIR__ . '/lib/setup.php');

and the comment below that line also includes any carriage returns.

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!

What did the error say?

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -

Yes, I have 3 moodle sites along with one WP - they are two 3.9.3 module sites and one 3.10.4

Each moodle site has it's own DB, it's own moodledata, and it's own code and they all are existing on different subdomains .

WHen I inserted the code, I got this:


And when  I clicked on site administration, I got this


In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Turn on debugging.   See:

https://docs.moodle.org/311/en/Debugging#Enabling_debugging

for how to do that.

Check web server error logs.

Are your DB lines in config.php correct?

What is DB host in config.php?   localhost or an IP?

Is the database utf8mb4 character set with utf8mb4_unicode_ci collation?

Is your server on a shared hosting plan?

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Debugging not turning on - giving the same message that requested file could not be found.

My DB lines in config.php are correct

My DB host is localhost and database character set to utf8mb4_unicode_ci collation

Yes, my serve is on a shared hosting plan

Each moodle site has a separate cron job

I just renamed the coupon code label to Training enrolment through language customization. I did same for other moodle sites, and they are working fine.

Since setting up this particular moodle site that is giving these issues, the site administration setting (appearance, serve, development, front page setting, plugins have all been work fine until few days ago when I noticed that accessing some of the admin settings started giving file not found error message
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Can you access the web servers error logs?

In your cPanel, right column, is there a block/section that shows server specs like memory and database usage?  What does that show?

Shared hosting normally has levels ... cheapest am going to say is the least powered server ... by that i mean memory, space, etc.

Shared hosting has caps ... limits.   And it might be the case where this one moodle is suffering upon reaching those caps.   Shared hosting may not show/report any error to the screen you can see ... it just drops traffic on the floor and what an admin sees is some strange behavior.

All that to say, your setup might be able to handle the WP and 2 Moodles, but gets pushed beyond limits/caps when trying to run a 3rd Moodle.

I'll send you a PM here.   Please respond to that PM.

'SoS', Ken

In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Your 'thrive' moodle appears to be hosted on InMotion Hosting.   They offer 3 shared hosting plans ... Launch, Power, or Pro ... which is yours?

Also, they offer one click installers for apps.   Did you install any/all the moodles with a one click installer?

Each moodle has it's own cron job.   Is the cron job for the troubled Moodle completing successfully?

You've said you run 3 moodles.   One is 'thrive' ... what are the other 2's hostnames?   What are their purposes? (testing?)

Please respond to the PM I sent you in these forums.

'SoS', Ken


In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

So others can follow and might be able to offer suggestions of their own ... or verify that advice you are getting is correct.

OP in PM says:

"3 moodles at different time. One for testing and the other two for delivering training"

Also says 'there is space' so that's not an issue ... or is it?

but has yet to respond on what plan using and the specs of that plan as well as it's limits.

So, once again ... which is your plan:

Launch, Power, or Pro?

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

OP now says in  PM ...

"My InMotion Hosting account is hosted by a reseller but I am working towards getting a direct hosting plan with another service provides Namecheap who happen to offer unlimited bandwith, diskspace, etc, which suits my needs more"

Sounds like the direction you need to go.

Anyone host with InMotion that might be able to offer some advice to the OP?

'SoS', Ken


In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers
Have been into server via cPanel.

Missing Terminal.   Also cannot open/set ssh open even though I've set up private keys.

Shared hosting from a re-seller sucks, to put it mildly.

So, a couple of things I would recommend to you:
1. allow the cron job for all of your moodles to be executed from the web. (you have to be logged on as an admin user and provide a password for the url to the cron script).

2. I have uploaded an sos.html page at the root of thrives.   Login as the admin level user and after logging on as admin user, use same browser to go to https://yourthrivesite/sos.html

The page has relative links to the following admin areas which you've reported don't show  once you've logged on.    These links should work.  Kinda cumbersome navigating to this sos.html page all the time to get admin stuff done, but you might be able to limp along with thrive until you migrate to
a more robust system (for others, OP has said plans to migrate to another hosting service that's more robust - OP - see link about migrating below).

SoS Page links

Search
Environment
Theme Settings
Theme Selector
Notifications
Plugins Overview
Additional Plugins
Manage Blocks
Manage Activities
Maintenance Mode
Debugging
Purge All Caches
Users
PHP Info
Server
Manage Auth
Manage Activities

Moodle Migration:

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Thank you so much Ken for your support.

I am still unable to access some core site administration functions and customization like appearance, plugins, etc

Not sure why, but will see if moving to a new hosting plan would solve this hitches
Thanks
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

You are using fordsome theme in thrive.  Does it need upgrading?

Suggest adding a line to config.php like so to force the theme to one that came with core code:

$CFG->theme='boost';

Or use the sos.html page I've installed for ya.

Also, inspected quite a few things for thrive ...

In config.php you have utf8mb4_general_ci for collation but database/tables/and all columns in those tables are utf8_general_ci

Disappointing ... so you didn't try any edits to config.php I suggested.

Appears you also have something called Futureimpatacademy.

running mariadb

logs for your word press:
[02-Jul-2021 07:00:12 UTC] PHP Fatal error:  Allowed memory size of 41943040 bytes exhausted (tried to allocate 114688 bytes)

Have 41 Meg and something wanted 114K more ... couldn't get it.

which would affect performance of the 3 moodles and whatever else you have on that shared host.

If you give me the password to the admin user (which I can see in the user table) for the thrive site, I can dig into that moodle a little more.   Actually use that sos.html file I've installed for ya.

Use PM to do that.

'SoS', Ken


In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Hello Ken,

It Moodle 3.9 and I initially used fordson compactible with it. Not sure which version I could upgrade to.

I actually did the edits you advised, guess there were some oversights 

Please, Check your PM
Thanks
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Have hacked creation of an account on thrive and set to admin level so I could do things ...

1. converted all the tables and columns in tables to match setting in config.php - you told me you did that, but not true.

2. Since you've not been able to get to admin areas ... you can now .. I updated additional plugins - a bunch of them.

Default theme set to boost via config.php file.

With debugging on and set to display to user ID 2 and 7, debug lines will show, but below that, one has the tabs for admin areas.  Those links now work.

There is one under users that shows [name] ... which is not right and has to do with userfiltersdefault and after finding what is normally default, added that value to config.php as well.

However, continuing to get:

String does not exist. Please check your string definition for usermanagement/thrive

    line 10487 of /lib/moodlelib.php: call to debugging()
    line 25 of /admin/settings/users.php: call to lang_string->__construct()
    line 8670 of /lib/adminlib.php: call to require()
    line 511 of /lib/classes/plugininfo/base.php: call to admin_get_root()
    line 1802 of /admin/renderer.php: call to core\plugininfo\base->get_settings_url()
    line 352 of /admin/renderer.php: call to core_admin_renderer->plugins_control_panel()
    line 215 of /admin/plugins.php: call to core_admin_renderer->plugin_management_page()

Refers to languages

Sorry, the requested file could not be found

More information about this error
Debug info: core_admin/setting_configcheckbox
Error code: filenotfound
Stack trace:

    line 123 of /lib/classes/output/mustache_template_finder.php: moodle_exception thrown
    line 54 of /lib/classes/output/mustache_filesystem_loader.php: call to core\output\mustache_template_finder::get_template_filepath()
    line 99 of /lib/mustache/src/Mustache/Loader/FilesystemLoader.php: call to core\output\mustache_filesystem_loader->getFileName()
    line 82 of /lib/mustache/src/Mustache/Loader/FilesystemLoader.php: call to Mustache_Loader_FilesystemLoader->loadFile()
    line 657 of /lib/mustache/src/Mustache/Engine.php: call to Mustache_Loader_FilesystemLoader->load()
    line 188 of /lib/outputrenderers.php: call to Mustache_Engine->loadTemplate()
    line 3002 of /lib/adminlib.php: call to renderer_base->render_from_template()
    line 1611 of /lib/adminlib.php: call to admin_setting_configcheckbox->output_html()
    line 144 of /admin/settings.php: call to admin_settingpage->output_html()

String does not exist. Please check your string definition for usermanagement/thrive

One messed up site ... have never seen anything like the above!!!

The missing file stuff ... What?????

@Howard, Mr. V, and Leon ... how about it guys?  Ever see anything like above?

Am stumped.

'SoS', Ken

In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
Hello Ken,

I actually did make the edits you advised on config.php, what I can't say however is if those edits affected the DB or not, and I did not check DB tables to confirm.

I am currently reviewing the errors flags, thanks so much for your support
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

When one changes DB collation in config.php, Moodle does not automagically reset the DB, tables, and columns in those tables to the DB collation in config.php - in your case, had to be done with your PHPMyAdmin.   Had you command line access, there is a php script in code/admin/cli/ that does that in a matter of minutes.

Wow!   You just informed my via PM that thrive was your first moodle and that you tinkered with that a lot.   Now giving up on thrive and will build another.   Wish you would have said that up front.   At age 72, time is of more importance to me than before.   So I just spent 4-5 hours of my 'free time' (going beyond what should be expected) attempting to fix something that OP is going to abandon.  sad

One piece of advice on setting up new ... don't use Softac!   Also don't use Softac to update what you have ... more fun and games!

Here's official docs:

https://docs.moodle.org/311/en/Installing_Moodle

Too bad you don't have command line access to your server as it does have git. A git install is by far the most efficient and sets up a moodle such that it can be updated and upgraded much more easily.

You mentioned migrating to another provider ...

https://docs.moodle.org/311/en/Moodle_migration

Best of luck!

'SoS', Ken



In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by GrowthWays Africa -
My sincere apologies,

I had to think of rebuilding because I felt being a messed up site it is going to involve a whole of reworking to get it back to shape which I felt would almost be the same time as building a new one. I only shared the worst case scenario playing in my mind with on PM. I had wanted to save myself the many hours of rebuilding again hence my reaching out here.

If there is something that could be done to get it back to shape, that would be much appreciated, I would only channel the energy of rebuilding to something else.

Thanks for your support
In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, will say for *you* ... yes, spend *your* time on new.  But consider this .. are we not doomed to make the same mistakes if we don't learn from past?

Maybe others will pick up where I am leaving off.   Am not angry really ... but like I said, I could have been spending my time else where.

Me, I've waisted enough of my valuable time on this!

Best of luck!

'SoS', Ken


In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... backed up thrive and restored to a RackSpace server which has cli and git in a subdirectory.   In config of thrive, debug was turned on full.   Same strange errors.  Was able to navigate admin menus cept for that one.

Did a side load of 3.9.highest via git and put that into the restored site.   Ran cli upgrade.

*NO ERRORS*.

Your admin login should work on it.

Check your PM for the URL to it.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Error Assessing My Core Admin Functions

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Mr. V thinks there should be new laws on software rights similar to human rights. One can't deliver a dying person to the next public hospital and wash his hands, not even with an animal, I guess. It is time to extend that to virtual "beings".
smile

Anyway, the good news is that the patient is healed - on his own: https://moodle.org/mod/forum/discuss.php?d=424216. So the senior medic may discharge the patient in good conscience and get some treatment himself.
In reply to Visvanath Ratnaweera

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

'patient healed' another instance of moodle (3.11).  The thrive of which I spoke is/was a 3.9.3.

I have gone extra miles to fix ... 'thrive' is now a fixed 3.9.7+ on my server ...  just can't fix on 'patient's' server. [Maybe you could! smile].

The 'extra miles' ... have backed up 'patient's now working thrive and put the backups in directory where 'patient' (now 'doctor') can ambulance transport the backups to 'doctor's' server and restore.  PM'd the 'doctor' the URL to those backups.

Ever have carpel tunnel surgery?   This 'senior' can tell you it's no fun afterwards!   So pardon this 'senior's grumpiness'! ;)

The world continues to spin ... and we all go on with our lives.

'SoS', Ken


In reply to GrowthWays Africa

Re: Error Assessing My Core Admin Functions

by Ken Task -
Picture of Particularly helpful Moodlers

One more thing ... each moodle needs to have a separate set up for the cron job ... recommendations are to run the cron job once every minute.

So have you set up the running of cron for all 3 sites?

What is that 'Training Enrollment' in right column of your screen shot?   Doesn't look like a core moodle block.

'SoS', Ken