Contents
1.1 I have forgotten the admin password
1.2 How do I prevent users from logging in while I do maintenance?
1.3 My site is stuck in maintenance mode
1.4 My log table has disappeared – No logs found!
1.5 How do I repair a corrupted LMS database?
1.6 How do I change spellings like ‘enroll’ to ‘enroll’?
2.1 How do the limits on uploaded files work?
2.2 How to change upload file size on a Windows localhost
2.3 How to change the maximum execution time for file uploads
3.1 My site is logging users out too quickly
3.2 Users can not log in, they need cookies and debug mentions config.php
3.3 After using the ‘Login as’ function, why am I logged out of LMS?
4.1 Why do I see [[missing strings]]?
5.1 How do I enable/disable debugging?
5.2 Incomplete page displayed when I click “Turn Editing On”
5.3 Receive error message “a required parameter (id) was missing” when uploading a file or
5.4 User gets ‘an invalid session key’ error
5.5 Why is a page blank, or half missing?
5.6 How can I fix just one bug, without upgrading my whole site?
Common questions
I have forgotten the admin password
First, try using the Forgotten password link (if you have one on your site.)
Failing that, if you can access the database using an administration tool, you can modify a password there. Passwords for all users, including admin, are stored as cryptographic hashes in the table mdl_user. You can manually replace the old hash with the md5 value of the new password, it will be upgraded to the strong hash value after the first log-in.
How do I prevent users from logging in while I do maintenance?
Use one or the other of the two methods for “Maintenance mode” to do this. For more information, please contact us.
My site is stuck in maintenance mode
Sometimes LMS gets stuck in maintenance mode and you’ll see the message “This site is undergoing maintenance and is currently unavailable” despite your attempts to turn-off maintenance mode.
When you put LMS into maintenance mode it creates a file called maintenance.html in lmsdata/maintenance.html (the site files folder). To fix this try the following:
- Check that the web server user has to write permissions to the lmsdata folder.
- Manually delete the maintenance.html file.
My log table has disappeared – No logs found!
The most likely cause is that the mdl_log table has become corrupted. NOTE: A new logging system has been in place since previous LMS versions as an option. Be sure to check in Settings > Plugins > Logging > Manage log stores to see whether you are still using the old style logging, Legacy log, or the Standard log.
How do I repair a corrupted LMS database?
Typically, you might see an error message like ‘./lms/mdl_quiz_grades’ is marked as crashed and should be repaired.
How do I change spellings like ‘enrol’ to ‘enroll’?
This is controlled by your language pack and default language. In this case, you are probably using the default LMS language pack ‘en’ which is common (and sometimes specifically Australian) spellings. If you need American English, add the en_us language pack and set it as the default.
Site policies and settings
How do the limits on uploaded files work?
File upload sizes are restricted in a number of ways – each one in the list restricts the following ones.
1. Not very likely these days (i.e. check if the other settings don’t work), there is a setting in Apache 2 which you may need to change. You can change the limit by adding or editing a line in Apache’s /usr/local/apache2/conf/httpd.conf with the upload size in bytes (check your operating system’s documentation for the correct location – e.g. under /etc/apache2 is a common alternative):
LimitRequestBody 10485760
2. PHP also has limits. If you have access to it they are set in your site-wide php.ini file. On shared hosting, you may be able to set these in a .htaccess file or a php.ini. You are recommended to check with your hosting company how this works on their systems.
In a php.ini file the lines will look something like:
upload_max_filesize 64M post_max_size 64M
…in .htaccess the entries will look like this:
php_value upload_max_filesize 64M php_value post_max_size 64M
A .htaccess file usually can be placed in the root of your LMS install and will affect the whole LMS. A (non site-wide) php.ini file may need to be copied into all the directories it needs to affect. The following are a good start:
* public_html * lms/admin * lms/course * lms/files * lms/repository * root of your lmsdata directory
Please note that a server restart may be required for the above changes to take effect.
3. LMS has a site-wide limit called maxbytes that may be set in Settings > Site Administration > Security > Site Policies > Maximum uploaded file size. The default here is (site limit) which it reads from the php.ini files You can set this lower if you wish for LMS itself but don’t set it lower than the largest possible file you will be uploading
To find out the server limit setting in php.ini (without server access, just using the LMS administration interface), see Settings > Server > PHP info (Tip: search for filesize)
4. You should usually set the default for all newly created courses to something lower than the site’s limit. This is set in Settings > Courses > Course default settings > Maximum upload size. Inside each course, this then may be individually set or changed for that course as needed by the usual instructor role in Course settings.
5. Activity modules that can be set to allow users to upload files to them, such as Forums and Assignments, have their own limits which may be set when adding or editing the activity.
How to change upload file size on a Windows localhost
In localhost, it is easy to change the uploaded file size to something larger than the default 16M.
Here is an example of how to change the upload file size to 100M.
- Find ../php/php.ini and open it with WordPad by right-clicking -> Open With -> then choose WordPad.
- In this file scroll or do a search on the text “_max_” to find
upload_max_filesize = 16M
- Change that line to
upload_max_filesize = 100M
- In the same way, find
post_max_size = 16M
- Change that line to
post_max_size = 100M
- Save the file.
After any changes to the php.ini file, you need to restart Apache. So restart xampp and browse to localhost. You should find that the Upload file size in Configuration now reads 100M.
See also
- Instructions below on How to change the maximum execution time
How to change the maximum execution time for file uploads
A side-effect of increasing the file upload limit is that the php scripts may execute beyond the limit set by default (300 seconds/5 minutes). To change this, look for max_execution_time in php.ini and change to something like this:
max_execution_time = 600
If you are using Apache and have a .htaccess file to change php settings, add this line to your .htaccess file:
php_value max_execution_time 600
Restart your web server for these changes to take effect, and check that the values have been changed by looking at your phpinfo output in the lms admin -> environment page.
Logging in and out
My site is logging users out too quickly
User login sessions are checked to see if the user is still active, and will log them out after a specific period of idleness. This is set in Settings > Server > Session handling > Timeout. The default is two hours. Increase it if you need to.
Your site’s config.php file probably has extra lines after ?>. The solution is to delete the last ?>.
After using the ‘Login as’ function, why am I logged out of LMS?
This is by design. After using the ‘Login as’ function, for security reasons you are automatically logged out of LMS when you return to your normal role. If you log in again you will be redirected to the page that you were on previously.
Text and Appearance
Why do I see [[missing strings]]?
Double square brackets around text indicate that language strings are missing for that function for that language. This is most common with third-party plugins or for languages that may not have all the strings translated for it yet.
First, update your language packs to the latest versions in Settings > Site administration > Language > Language packs > Update all installed language packs.
If the missing strings are for a non-standard plugin, try to update that plugin and/or check with that plugin maintainer to see if this is a reported issue. If you have access to the server code, you can check the code for this plugin; language strings are supposed to be contained in a lang folder within the module or plugin folder.
Note: after changing language strings you may see a lag in the cache for these to show up. You can force this in Site administration > Development > Purge all caches.
Changing text in LMS
The language editing interface in Settings > Site Administration > Language > Language customization enables you to easily change any string, any word or phrase, used on the site.
The strings are stored per language pack. So if you change them for ‘en’ (common English), that will not change them for ‘en_us’ (US English) or any other language.
You may need to search through several files to find the word or phrase you are looking for. The file lms.php contains all common site-wide phrases and the admin.php contains many admin phrases. Tip: if you don’t know the file the string is in, select ALL the file options to search through.
Also, these customizations override but do not delete the default language strings but are stored separately in the language folders in your site’s lmsdata location.
Errors and Troubleshooting
How do I enable/disable debugging?
If you are getting a blank or partially complete page, or receive a page that presents a short error message that is not informative enough, you can turn on debugging to learn more details.
Turning on debugging will let you see what the error message is, which may help you diagnose the problem. Set this in Settings > Development > Debugging.
Incomplete page displayed when I click “Customize this page”
When you see an incomplete page, it is normally a sign that an error occurred. To find out more, turn on Debugging, and you should see an error message which may help you to diagnose the problem.
This is usually as a result of an incompatible contributed module or block that you have installed. Follow these steps:
- Follow the module removal instructions in Installing contributed modules or plugins.
- Re-visit your course page and try clicking on the “Customize this page” button again.
If you find an incompatible module or block, please report the problem to the person named as the maintainer in the Modules and Plugins database.
Receive error message “a required parameter (id) was missing” when uploading a file or
This message sometimes is generated when attempting to upload a file larger than the upload limit. This can also be caused by user’s having more than one login to the same site open in the same browser in different windows or tabs.
The user gets ‘an invalid session key’ error
A number of things may be caused the invalid session key error. The most common is if the person tries to login into the same LMS site in more than one tab or window in the same browser. That will not work. The fix is to close all those tabs and windows and close and restart the browser. This is almost always a transient issue. The fix is to close and restart the browser and log back into LMS.
If you send someone a URL to something in LMS, like a course activity or particular page, it may be that the session id key is tacked onto the end of the URL. Simply delete that parameter from the URL.
Why is a page blank, or half missing?
A blank page, or a page that seems to have half missing, is normally a sign that an error occurred. If (as is recommended on production systems) you have the display of error messages turned off, it can be very hard to understand what is going on.
The solution is to turn on the debugging options temporarily. Then, when you go back to the problem page, you should see the error message. Once you had finished solving the problem, remember to turn debugging off again.
How can I fix just one bug, without upgrading my whole site?
Suppose:
- You are experiencing a particular bug.
- You have searched in the tracker, and found that your problem is MDL-abc, and that it has been fixed in the latest version.
- For some reason, you cannot upgrade your whole site, even though the latest version probably has security fixes.
Then, how can you get the fix for just this one bug, without upgrading your whole site? Well, if you are prepared to manually patch the code, you can probably get this information from the tracker.