Unexpected installation halts: Difference between revisions
m (Added link to spanish translation of page) |
|||
Line 46: | Line 46: | ||
*[http://moodle.org/mod/forum/view.php?id=28 Installation Forum at Moodle.org] | *[http://moodle.org/mod/forum/view.php?id=28 Installation Forum at Moodle.org] | ||
[[es:Paros inesperados de la instalación]] | |||
[[ja:予期しないインストールの停止]] | |||
[[ja:予期しないインストールの停止]] | [[ja:予期しないインストールの停止]] |
Latest revision as of 14:14, 14 April 2016
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.
Code customizations
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.
Do not upgrade incrementally
To avoid this problem when upgrading, it is recommended to upgrade directly from any previous version to these versions: 1.x -> 1.9.19 -> 2.2.11 -> 2.6.x
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.
Database configuration issues
If the installation hangs after entering your database details, it is likely that there is a problem with the details that you have entered for accessing the database. For example, if your MySQL database is running on port 3309 rather than the default 3306, make sure that you set the database URL to "http://localhost:3309" rather than just "http://localhost".