CÀI ĐẶT MOODLE
Mọi người giúp dùm em khắc phục lỗi cài đặt này (gấp)
Why is a particular page blank or incomplete?
- Check your web server log files!!
- If a particular page is blank or incomplete (it doesn't display the footer), before you do anything else check your PHP error logs. Having established that PHP error logging is working, reproduce the error. Immediately check the error log file right at the end. Hopefully you will see a PHP error message at or very near the end of the file. This may solve your problem directly or makes it a lot easier to diagnose the problem in the Moodle forums.
- If you are upgrading to a new version of Moodle, check that you do not have an old version of a non-standard block or module installed. Remove any such blocks or modules installed using the admin settings page and start the install process again. However, do also make sure that you have included all optional plugins that were required by your courses.
- If you do not see any blocks listed, turn editing on and remove any blocks that you have added to that page and try reloading.
- You may get this error immediately after selecting a language. At this stage of the installation process your Moodle computer may need to connect to the Internet and download a language pack, so check that the computer can access the Internet by using a browser. Check also that your PHP settings are as given in the Moodle Moodle Requirements page.
- Using Moodle PHP configuration error forum discussion
Installation hangs when setting-up database tables
Sometimes the installation will hang when setting up tables, where only half the page displayed in the browser and/or other outputs are removed. You may see truncated MySQL statements, or the “Scroll to continue” link is displayed but no “Continue” button is there.
See Unexpected installation halts for more about solutions that involve:
- Checking for MySQL limits
- Checking the .htaccess files
- Code customizations issues
- Checking memory limit
- Upgrade incrementally
- Fix fopen function
Unexpected installation halts
Sometimes the installation will hang when setting up tables, where only half the page displayed in the browser and/or other outputs are removed. Examples and causes are:
Truncated MySQL statements
(mysql): SET NAMES 'utf8' -------------------------------------------------------------------------------- (mysql): SHOW LOCAL VARIABLES LIKE 'character_set_database' ... ... (no more statements are displayed)
Missing Continue button
The “Scroll to continue” link is displayed but no “Continue” button is there.
- Note: There is an exception to this when upgrading an existing database and the installation may appear to hang at the roles generation phase. This process can take a very long time - so please be patient.
Below are some solutions you can try to overcome this problem:
- Check for MySQL limits. This is often a MySQL error and not a php error. Check that there is no limit placed on your mysql database, e.g. a "questions" limit. See Limiting Account Resources in the MySQL manual.
- Check your .htaccess files. If the install is on a webhost, adding the following line to the .htaccess file in the Moodle directory has been known to solve the problem.
AddType x-mapp-php5 .php
- Try also renaming the .htaccess file so that it is disabled.
You may also want to look and see if you've customized any of your code. Look at the last successful table, and then look at the block, mod, or other code that is referenced by that table. For example, if your install hangs and continues to say that the forum tables were successful as the last message, look at /mod/forum/ for any custom code. If you have customized code, backup those files and replace with the correct files. You can then restart the install by renaming config.php or reinstalling your database from the backup. If your install is successful, you can make your code changes back into the stock Moodle code.
Check your memory limit
It may also be that the "memory_limit" in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see Moodle requirements). For Moodle version 1.8 and above at least 40MB is recommended.
To avoid this problem when upgrading, it is recommended to upgrade via each version of Moodle, for example 1.7 -> 1.8 -> 1.9 (with the exception of upgrading from 1.5 or 1.6, when it is recommended that 1.7 be skipped, in other words upgrade 1.5 -> 1.6 -> 1.8 -> 1.9).
A work-around to this problem is to setup a working Moodle system on your local PC or server using the Moodle Packages. Once you have a running Moodle, backup the database and import to your webhost. Then backup the Moodle code itself (the "moodle" directory on your PC) and copy this to your webhost using (for example) FTP. Finally, edit the moodle/config.php file for the new settings that have to be changed for the webhost.
Some Moodlers have found the suggestion in http://moodle.org/mod/forum/discuss.php?d=65786#p297433 helpful, for some unknown reason. It claims that it is because the fopen function in the line (now line 426 instead of 406) was not being given a string as the first argument, but that's not true. It was a string; after the edit it is a string whose first and last characters are single quote marks. The amazing thing is that it works at all after that edit. What's even more amazing is that it fixes the problem, at least for some users. Go figure.