please i need to edit "mdl_config" file, but i cant find it among the moodle files in the moodle folder. any help on how to locate this file?
kind regard.
please i need to edit "mdl_config" file, but i cant find it among the moodle files in the moodle folder. any help on how to locate this file?
kind regard.
You'll never find it... there's no such file.
mdl_config is the name of one of the tables in the database.
Perhaps take a step back and tell us what has gone wrong and what you are trying to do?
Agreed, Adding $CFG->disablelogintoken = true works
However, I noticed that my custom theme didn't have
<input type="hidden" name="logintoken" value="{{logintoken}}">
as an input field on the theme/mytheme/core/loginform.mustache and that appears to be why it kept failing.
Update any forms in your theme to use the hidden input.
the newest boost has it built in if you need a reference.
thanks a lot and god bless for your prompt reply.......
am trying to install "moodel/stable29" in a sub-domain on my server, but i keep getting this error.
when i clicked on the link in the error message it redirected me to a moodle debugging screen that said i need to edit the " mdl_config"
please find attached picture of the error message.
thanks so much
Good day,
I performed a fresh installation of Moodle 3.6.2 using softaculous on my hosting server and the installation seems to have gone well. However, when i open the website, it doesn't load correctly - sort of like the theme or the CSS isn't loading with the page.
I am at a loss with what to do to proceed. Should i delete this installation and choose a lower version? is there something i am not doing right?
Please help.
Try purging the cache by going directly to the URL for that tool in your browser:
https://yoursite/admin/purgecaches.php
2 options ... think I'd try all.
Comment about Softaculous ... all moodles need updates and upgrades at some point in the future ... does your provider offer updates or upgrades to the Moodle via Softac.? Other customers on your hosting provider might be able to share their experiences about updates/upgrades of Moodle. Suggest locating the providers FAQ/Community forum area and check them out for anything Moodle.
Be forewarned that there are not many folks who haunt these community forums and who volunteer their time to attempt to assist ('free support'??!!) that have or use SoftTac.
Just sayin'!
'spirit of sharing', Ken
Thanks Ken,
I did the purge cache as you advised but no changes. My hosting provider offers moodle update via softaculous. Infact, i was on 3.5.1 or so when the update for 3.6.2 came out on softaculous, which i did and encountered this issue. So i thought i must have done something wrong, i deleted and installed a fresh one but yet this is still happening.
i will go to the forums for my provider to ask but i hope someone on here can find a solution for me
Seems the more one discusses, the more detail comes to light.
So you: tried to update via SoftTac. Didn't work 100% - theme issue. So now you've deleted the updated SoffTac install. And installed a fresh moodle. How? Via SoftTac? And the issue hasn't gone away.
If that is correct so far, then the only conclusion one can make reading about what has happened so far is SoftTac installs of Moodle have issues.
Don't work for your provider ... who IMHO, is almost criminal ... telling you SoftTac upgrade will work by providing you a link/button to do it. And when customer tries it ... oops ... snafu! Did your provider help desk suggest you visit these forums for help? Hmmmm ... provider doesn't support what they offer customers. Like I said ..... darn near criminal!
Ok, so let's begin the guessing game ... you have cPanel. Find the moodledata directory and manually remove all files/contents in the following folders: cache and localcache. That's moodledata directory ... not moodle code ... and its the *contents of* cache and localcache ... not the folders cache and localcache.
Then, try accessing your site via browser again. It should be slower at first, moodle is attempting to update the contents of the cache and localcache folders as you click around, etc.
Now if that doesn't work, then this is the last thing I could suggest ...
edit your config.php file ... cPanel does have an editor ... that resides in the moodle code directory. I cannot tell you where the moodle code directory is located but probably in public_html.
In the config.php file add the following line ** right after this line **: $CFG->admin = 'admin'; on a NEW blank line.
$CFG->theme='clean';
Save the config.php file.
No need to restart anything, just use a browser and hit the site.
There is only one other option and that involves ssh access (cli) access to your server and running a command line only script to do the same thing ... purge_caches.php in moodlecode/admin/cli/
You did check out the environment when the site was a 3.5.1 to make sure your hosting environment could handle a 3.6.highest installation - minimum of mysql 5.6 and php 7.0.0 ... although if your provider is still running both of those versions they are providing you with software that is out of date and has reached end of life.
Ok ... that's all I can guess. Best of luck!
'spirit of sharing', Ken
Oh Ken,
You're a moodle genius.
I added the line in my config.php file and it worked.
Thank you soo very much!!
Hmmm.... tell us how you installed Moodle? What instructions did you follow?
Has the installation gone wrong and you've tried to restart it?
Welcome. Genius??? Far from it ... but you are not out of the woods yet. :| You have an a 'band aide' in place.
With that line for the theme in config.php that's the only theme you can use with the site.
Comment out the line you added for theme by putting // in front of that line. Save the file.
Hit site with browser. Still working?
So you didn't answer some questions ... on the re-install, did you use SoftTac again or used Moodle Docs instructions ( that you translated into cPanel-ese)?
If provider has a community forum, might want to post in that forum info on the 'band aide' provided here.
Other question ... did helpdesk of provider help? If they just pointed you to these forums without making any effort at all to assist, consider that provider might not be a good place to host a moodle.
Once installed, the journey has begun. By that I mean ... moodle will need to be updated or upgraded in the near future. May as well start to study up ...
https://docs.moodle.org/dev/Releases#Version_support (scroll down)
https://docs.moodle.org/dev/Releases#Moodle_3.6
https://docs.moodle.org/36/en/Upgrading
Along with that, do learn how to backup your site ... and study up on how to restore it where you host.
And do feel free to rate the posting that helped as 'Useful'. That helps me 'earn my badges' and thus another way to say 'thanks'.
'spirit of sharing', Ken
To add what Howard asked ...
First line in screen shot is a clue ... "you have an error in SQL syntax ... check the manual ... that ... MariaDB."
So now we know you are using MariaDB.
Your server platform is? PHP version is? MariaDB version is?
Are you installing a moodle inside another moodle code directory? (uhhhh, that's not good)
You might be attempting to install an older version of Moodle on a server
that has higher versions of PHP/MariaDB and thus moodle code is too old.
For a 2.9.x minimum PHP is 5.4.4 and MariaDB is 5.5.31 but that version
of Moodle may not run on PHP 7.0 or 7.1 and MariaDB 10.x.x. (probably won't).
'spirit of sharing', Ken
Good morning.
I am getting the following when trying to install Joomdle:
Exception - Call to undefined method cache_disabled::purge_current_user()
×Debug info:
Error code: generalexceptionmessage
×Stack trace:
line 131 of /user/lib.php: Error thrown
line 81 of /auth/joomdle/db/install.php: call to user_create_user()
line 29 of /auth/joomdle/db/install.php: call to joomdle_moodle_config->create_user()
line 610 of /lib/upgradelib.php: call to xmldb_auth_joomdle_install()
line 1852 of /lib/upgradelib.php: call to upgrade_plugins()
line 694 of /admin/index.php: call to upgrade_noncore()
I am using Moodle 3.6 on PHP 7.1.
Thanks!
-Reuel+
I created this Microsoft Access VBA programming eBook to help breakdown and explain the reasons for programming Access in the first place and where it should be written, then implemented and ultimately maintained for end users. I demystify the challenges of having a programmer’s mindset and show you step by step, the essential key components to writing good code. Any Access user would be proud to add this skill to their CV.
Some background ... site has been marched from 1.9.x to 3.x. A couple of years ago, entity decided to 'go google' and all online training moved to Google Classroom. Intity had one teacher still using Moodle so not much done in the area of care/maintenance.
Recently, a new Teacher is interested and plans on using their Moodle.
Decided to attempt to 'future proof' their server since server would probably be on it's own for a long time. So upgraded the PHP to a supported version and upgraded MySQL to 5.7 ... from the MySQL-community repo (significant). OS is CentOS 6.10.
Checked things out (not everything, obviously) ... informed new Teacher ready to go and in 2 days time, informed that something was broke. Teacher attempting to upload users via a correctly formatted .csv file and the error above would appear after the upload of the .csv and after the screen where one chose character set - UTF8 was default, delimiter set to ',' ... ie, just the defaults. The other issue ... restoring a course backup that had been made from the same site and had only one resource in that backup.
This reported in debug ... of both upload users and restoring a course.
COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'
In the restore of a course, this additional:
[Wed Jan 23 14:23:40 2019] [notice] [client ipaddress] Default exception handler: Error reading from database Debug: COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'\nSELECT 'x' FROM mdl_user WHERE LOWER(email) LIKE LOWER(?) COLLATE utf8mb4_bin ESCAPE '|' LIMIT 0, 1\n[array (\n 0 => 'studentfirstname|_studentlastname@isd.net'
Student Email addresses were in the format of studentfirstname_studentlastname@isd.domain.
At first thought there was an issue with MySQL 5.7 escaping "_" - the pipe symbol in the error log just after students first name. But no. However, it was related to MySQL 5.7.
MySQL 5.7 -> do not provide the example cnf files ... small, medium, large ... thus the upgrade to 5.7 didn't leave any my.cnf.rpmsave file. Old my.cnf file (config for MySQL) hadn't changed.
Digging into docs for MySQL 5.7 ... many changes ... some of the my.cnf lines no longer required ... ok, fixed those restarted mysqld and no change. By this time !@#DCQWERQWEQWD!
Further investigation ... changes to defaults in my.cnf will not change/alter any existing database .... nor it's tables ... nor the columns in those tables.
CLI scripts in admin/cli/ of moodle code run, but still not going deep enough into tables/columns and setting what needed to be set.
Almost resorted to doing many queries like the following to fix:
ALTER TABLE mdl_user CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_devices CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_enrolments CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_info_category CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_info_data CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_info_field CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_lastaccess CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_password_history CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_password_resets CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_preferences CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE mdl_user_private_key CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Notice I said 'almost' ... 400+ tables + dunno how many columns in those tables ... too much ... would spend a week doing above.
So the my.cnf file was set correctly, just had to find some way get the server to work for me ... not the other way round ...
Then I remembered a command I hadn't used in years!
mysqlcheck -u root -p [dbname] --auto-repair --optimize
Tables don't support optimize, doing recreate + analyze instead
is reported for every table .. will take a long time to run.
But, all is fixed ... database, tables in the DB, and columns in the tables.
This posting just to share an experience and hopefully provide a clue for someone else.
Note: more changes are forth coming in MySQL 8 ... know Moodle HQ talking about which/what now for required versions or minimal versions of MySQL/MariaDB in next release and future releases.
In reading up on changes/differences between MySQL 5.7 (dunno what happened to 5.8 or 5.9 ... or version 6 and 7) to 8, we won't be in Kansas any more ... again. Hopefully, there will be some Wizards of OZ around by then.
Anyhoo ... 2 cent sharing,
'spirit of sharing', Ken
good evening... and thanks so much for your contribution i greatly appreciate, after reading you debugging suggestion and taking everything into consideration i was able to change my php version on my server from 5.5 to 7.0. everything is working fine now. i was able to install moodle 3.6 and it working perfectly fine. thanks to everyone who contributed. remain blessed
After this week's recent upgrade from 3.5.3 to 3.6.2, the hosting provider informed me about the following fatal error:
[pid [2920676|tel:2920676]] writev(6, [{"LS\6\0\n\1\0\0", 8},
{"PHP Fatal error: Cannot redeclare get_roles_with_assignment_on_context() (previously declared in public_html/lib/accesslib.php:4101|http://famschouten.eu/public_html/lib/accesslib.php:4101]) in public_html/lib/deprecatedlib.php|http://famschouten.eu/public_html/lib/deprecatedlib.php] on line 3452\n", 258}], 2) = 266
The previous version was running fine (not aware of warnings nor errors) and this week's upgrade was executed automatically by Installatron Applications Installer.
Do you have any suggestion to fix this error? The site is totally blank as a result of this error. Thank you very much!
Here is line 4101 from lib/accesslib.php in Moodle 3.6.2
https://github.com/moodle/moodle/blob/v3.6.2/lib/accesslib.php#L4101
It is NOT a declaration of function get_roles_with_assignment_on_context() as your error claims.
However, if you look at lib/accesslib from 3.5.3...
https://github.com/moodle/moodle/blob/v3.5.3/lib/accesslib.php#L4101
...there is the offending declaration!
Conclusion - you have upgraded some files but not others. I don't know what you have done but you clearly have now got a mix of 3.5.3 and 3.6.2 files. It might just be accesslib.php but who knows?
The sensible thing to do is to completely replace the code with a fresh download of 3.6.2
Hello family! I upgraded to 6.2 but the problem now is that i can't see the camera neither the microphone. All I can do is to upload videos for my classes. Could someone help me please?
My theme is WP 5.3