DH can provide an excellent environment for experimenting with Moodle. However, there are a number of issues that the new or potential user may want to consider.
- 1 Versions
- 2 Mail
- 3 Cronjob
- 4 Directory Structure
- 5 Configuration
- 6 PHP Issues
- 7 External links
While DH offers a One-Click install of Moodle 1.9.10 and stays reasonably current with Moodle version updates, with the release of Moodle 2.0 DH has yet to decide when it will offer a One-Click install of Moodle 2. See below for more about the issues presented by Moodle 2 and the reason YOU need to be involved.
Use of forums on Moodle can result in possible violations of DH mail allowance and SPAM policies. If you plan on supporting a substantial number of students on your Moodle and plan to use forums, you may want to consider hosting your production Moodle elsewhere.
Moodle uses the cron facility to get things done (deleting files, sending forum emails, etc.) You should use cron to process moodle work every 5 or 10 minutes.
You can set up a cron job manually (you need to use the shell to edit a crontab file and that is a bit beyond the purpose of this section but you can find additional information but you may want to read the rest of this entry first) and you can run the cron job manually (type the following url in your browser: http://mydomain.com/moodle/admin/cron.php). But, the easiest way to manage any cron job at Dreamhost is to use the Dreamhost cronjob interface.
First: change the users rights for the user that should perform the cronjob: > users, > Manage users, > Edit
Second: go to the Dreamhost > Goodies (> Cron Jobs).
Add new Cron Job.
Follow instructions on the screen:
Use the DH user with the correct rights. Set the time at 5 minutes or so. And
use the following command:
wget -q -O - http://mydomain.com/moodle/admin/cron.php
Moodle now has the ability to both password "protect" access to cron.php and limit access to command line usage. While command line usage may a bit more secure, it is by default open to anyone on your shared host.
Should you wish to use command line invocation you will need to use the following command from your Control Panel if you are using php5:
Note that if you install Moodle on DH the default is to install in your webroot, which is not the typical Moodle install as typically moodle is installed in webroot/moodle.
Link to original Moodle docs: http://docs.moodle.org/en/Cron.
Authentication Synchronization Cron Settings
Certain authentication plugins may require cron jobs to be set up (db, ldap, etc.). These are not included in the cron.php job.
You need to create another cron job if you want these synchronization processes to run. I successfully have run these with the following command in the Control Panel cron settings:
Rewrite the path and php file name to match the synchronization process that you want to run.
Also, you should be aware that these processes are not terribly efficient. They might fail or time out if you have a large number of users.
Also, these jobs typically send a lot of text output, even if they run successfully and add no users. I recommend NOT having it e-mail you the output of the job, or you will get an e-mail every time the job runs.
On installation, Moodle code will be placed in one directory (typically in the root of your domain if you use 1-click installs, as in /home/username/moodle.mydomain.com), a data structure will be create in another directory (typically "_moodledata" is appended to the first directory as in /home/username/moodle.mydomain.com_moodledata) and Moodle will employ a mysql database (typically created by 1-click when you create a new moodle installation.)
In the directory with your moodle code there should be a .htaccess file with the following content:
deny from all
When using DreamHost one-click installation this is done for you (it worked with Moodle 1.9 installation).
You will also probably want to set up a custom php.ini. To do that you will want to follow the instructions you will find here.
Here are some recommended values that you may want to change:
This setting will eliminate the "display_errors" warning on the admin page:
display_errors = Off
If you want to increase the file upload size beyond the default, set these to larger values:
post_max_size = 7MB
upload_max_filesize = 7MB
If you increase the file size values, also be sure to make the execution and input time settings above high enough. Otherwise the script will time out if the user uploads a large file over a slow connection.
You may see advice in the Moodle forums to increase the max_execution_time, max_input_time, and memory_limit values. Increasing those values in the php.ini file will not really help, because the DreamHost shared hosting system will cut off long-running processes. If you really need to run long processes, consider upgrading to the DreamHost VPS hosting solution. Then you will be able to have longer-running processes.
Do not go crazy setting these values too high, or the server administrators will complain about your site's performance drain. For more information about performance settings in Moodle, see the Moodle Server Performance documentation.
There have been problems with quizzes that were not appearing using the install Dreamhost provides. The problem is in config.php
BAD: $CFG->wwwroot = 'http://domain/moodle/.';
GOOD: $CFG->wwwroot = 'http://domain/moodle';
Within Moodle, there is the option to specify system paths for zip, unzip, and directory listing executables. Specifying these values can help avoid failed backups and other time-out problems.
Within Moodle, go to Admin > Server > System Paths. Specify the following values for zip, unzip and du commands:
For more information on these system path values, see the Moodle documentation.
NOTE: If you set these paths and you use a custom php.ini file, you MUST make sure that the "disable_functions" argument does NOT include "exec". Moodle uses the exec function to execute these external programs. If your php.ini file disables "exec", then all your backup and restore functions will fail.
Dreamhost as yet does not support all the required Moodle php settings (all you Moodlers out there should be requesting changes!!) Most importantly Dreamhost does not provide access to the socket or xmlrpc extensions. Unfrotunately, it appears that while Dreamhost does provide access to PEAR so as to use similar PEAR extensions, Moodle will not employ those extensions. This is an area for Dreamhost Moodle users that requires some attention. Either access to PEAR extensions needs to be such as it can be easily accessed, or Dreamhost needs to provide access to the extensions.
The alternative is to compile your own version of PHP. While there are extensive wiki articles here about doing that, some are inconsistent and not all suggestions are vetted. There has been some discussion as far as makefiles or other tools that Moodle might make available for assisting users in compiling their own version of PHP and if this is something you support you should sound off in the Moodle forums.
Support for Moodle 2 Generally
While Moodle 1.9.10 is available from DreamHost as a one-click installation and Dreamhost has been pretty consistent with providing one-click upgrades, DH has indicated that it will only support one branch of Moodle at a time. This presents some critical issues for any Moodle user on a DH server, including php updates and the choice between Moodle 1.9.x and Moodle 2.
DH had not provided support for xmlrpc or sockets within the shared php5 binary (though you can do a custom build.) However, Moodle 2.0 requires php 5.2.4 as well as the zip libraries (xmlrpc and sockets are recommended). DH, asked about support for Moodle 2, stated:
Right now, we don't have plans to edit our php installation. Doing so means a pretty big change to the 2000 or so servers we have on our network. We don't make changes like that just because a piece of software needs it, even if it's a one click. One click installs take a back seat to stability of our core services. We do take everything into consideration, though, and I'll let our administrators know about this.
However, DH has made a php5.3 build available as a beta. That means that if you want to run Moodle 2 you can select the php5.3 beta (a new panel option under Manage Domains->Web Options) , install Moodle using CVS (arguably a better idea if you want to stay current) and things should work just fine (DH will want to hear about any issues so that they can tweak their 5.3 beta to address any problems), but if you want to continue to use Moodle 1.9 via One-Clicks you need do nothing additional. And that means that we really need to talk about what position the Moodle community on DH should take vis-a-vis whether DH should move to Moodle 2.
Moodle 2 as a One-Click
There are quite a few issues with Moodle 2, and once you upgrade to Moodle 2 your database can no longer be read by Moodle 1.9.x. In other words, there is no reversing the process. There is no way to import 1.9 data. There are few modules that as yet work with Moodle 2. Moodle 2 functions are unclear to many and have caused quite a bit of concern.
There is a thread available now at http://discussion.dreamhost.com/thread-128354.html to discuss whether DH should offer Moodle 2 as a One-Click, and if not now, when, and based on what criteria. Please contribute!