Recently some friends of mine in New York, who are setting up a language school online, asked me for some help. The Problem?
They signed up for a web hosting account with HostMonster.com. I suggested they use HostMonster because I have run a number of sites from a HostMonster account and found them to be good. But they were getting a number of strange Moodle errors. Errors like this:
After a little investigation it turned out that they had used the hostmonster install script to install Moodle on their site. I really recommend you don’t do this for a production site. In our case there were two main problems:
[unordered_list style=”red-x”]
[/unordered_list]
When they attempted to insert Japanese text into a question or lesson, it would throw the above error because the database was incorrectly set up for non ascii character sets. The first thing I tried was to run a script that would change all the fields and tables collation to a unicode/UTF8 collation. I used an SQL script from Dr Byte of ZenCart fame, to do this. While this appeared to work, every so often another SQL error would get thrown. It appeared that the collation change had the effect in some cases of dropping default values from a field’s definition. Moodle sometimes relies on default values when doing inserts, and these would fail. I patched these errors up as they occurred, but it soon became clear we would be building a house on sand, if we persisted with the current install of Moodle when building the new site.
So I installed a fresh install of Moodle 2.2+. Suddenly Moodle complained because the version of PHP that HostMonster was running was too old for Moodle 2.2+. (Moodle currently requires PHP 5.3 ) I was starting to regret recommending HostMonster. But I decided to give them a chance to redeem themselves, and I mailed support and asked them if they could upgrade our server to a later version of PHP. Support is everything with a web host, and HostMonster has always been pretty good in my experience. They did have aPHP 5.3 server available and agreed to move our account across (after trying to scare us off with some tech mumbo jumbo).
After our account was moved across, I was able to install Moodle 2.2+ with no hitches. Moving from Moodle 2.01 to Moodle 2.2+ is a far easier task than it would have been in the old Moodle 1.9 days. I simply backed up each course from Moodle 2.0.1 and then restored it to a new course on Moodle 2.2+. The front page settings however could not be restored due to an outstanding Moodle issue (MDL-31500) . I had to recreate the front page manually.
The only task remaining was to move the new Moodle installation into the root of the public_html folder on the web host. I was able to select all the old moodle files and move them into a new folder called moodle201 , using the cpanel file manager. Again using the cpanel file manager I moved the new moodle files to the public_html folder. The final part of this process was setting the config.php file in the root directory of each Moodle installation, with the new wwwroot value (ie the url of the site root.)
In the next post I will tell you how we installed PoodLL. That was the easy part …