Often teachers and administrators want to use Moodle in a live shared web hosting environment instead of a private local computer install. Many hosting companies such as Go Daddy have a one-click install of Moodle. In the case of Go Daddy, they install Moodle 1.9 (as of 2/18/2013) but what if you want to run a later/newer version of Moodle (see below Go Daddy tech support response) or your web hosting company doesn't support Moodle one-click installs? This installation guide will walk you through the steps to install the latest version Moodle on SmarterASP.NET shared web hosting.
Upgrading Existing Moodle Install on Go Daddy shared hosting
Here is Go Daddy Tech Support's response to the question on how to upgrade to Moodle 2.4 on their linux shared hosting.
"Thank you for contacting Online Support. I understand you need your Moodle upgraded. We are unable to upgrade the Moodle for you and unable to provide exact instructions on how to do it. The upgrade is not done through the hosting control center. You must do the upgrade through the coding of the site itself. Moodle will provide you with instructions on how to upgrade Moodle. Upgrading Moodle" (Go Daddy tech support response by Taylor P. on 2/22/2013)
obtain web hosting account on SmarterASP.NET(if you like this tutorial, please support me by purchasing through my affliliate account)
I purchased the .NET Premium shared hosting for $7.95 a month ($95.40 a year)
Configure Domain Name Server (DNS)
DNS on Go Daddy
If you purchased your domain from another hosting company, you will need to login to the control panel of that hosting company and have the DNS entry point to the SmarterASP.NET servers, ns1.dns-ez.com & ns2.dns-ez.com
If your domain was purchased from Go Daddy, here is the steps to set/change the domain name so it points to SmarterASP.NET web hosting
login to Go Daddy My Account
My Account → Domains → WestCTA.com → Launch → Nameservers Set Name Server
change nameserver to point to smarterasp.net, ns1.dns-ez.com and ns2.dns-ez.com
login to SmarterASP.NET control panel add new site in the Hosting Manager → Website Domain Manager → Add New Site
Website/Folder Name: ccsdcurriculum.com
Programming Language: PHP
might have to rename site5 to ccsdcurriculum.com, under the Site heading click the pencil paper icon next to site5 to change the name to westcta.com
if you forget to do this, will not be able to rename the site if you have a folder with the same domain name. Here is the work around
1. rename the ccsdcurriculum.com folder to something different like, 1ccsdcurriculum.com
2. change the domain name from site4 in website domain manager to ccsdcurriculum.com. Note, won't be able to do this if a folder of that name already exists.
3. rename 1ccsdcurriculum.com back to ccsdcurriculum.com
add domain www.ccsdcurriculum.com to site5 by typing ccsdcurriculum.com under the Mapped Domain column heading and then clicking the Add button.
Create website directory and moodledata subdirectory
login to SmarterASP.NET control panel
Hosting Control Panel → Hosting Manager → File Manager → New Folder and recommend giving it the same name as your domain name, i.e. ccsdcurriculum.com. This folder might already exist, created automatically from previous step.
create a New Folder under ccsdcurriculum.com called moodledata. Note that SmarterASP.NET uses Windows Hosting so you cannot change permission like on linux systems using chmod 775
Hosting Control Panel → Hosting Manager → File Permission. Can only set edit Read/Write or edit Read-Only. I kept it at the default Read/Write but down the road Moodle complains the moodledata folder is not protected.
Setup FTP account
Goal is to create an ftp account to transfer local files to SmarterASP.NET
login to SmarterASP.NET control panel
Hosting Control Panel → Hosting Manager → FTP Users Manager → Add FTP User. Enter a user name and password.
Unable to create a ftp account at the root level with SmarterASP.NET, need to create a subdirectory. Recommend naming the file directory name the same as your domain name, for example ccsdcurriculum.org.
Create MySQL database
login to the SmarterASP.NET control panel and navigate to Hosting Control Panel → Database Manager → MySQL Manager → click Create New Database
enter a portion of the database name, like moodcur and the fullname will be db_9898fc_moodcur and a password of Abcd1234
write down the connection string info (Database Name, Server URL, Login Name and Password) as this will be used when creating the config.php file
download zip version of moodle, moodle-2.4.1.zip standard package, don't use the windows installer one because this includes Apache, PHP and other server stuff which is not needed on a shared hosting environment.
Typically shared hosting companies do not allow remote desktop access (windows) or telnet shell access (linux) to manually download files to the server, so we have to download to your local computer and then upload it to SmarterASP.NET
Upload zip version of Moodle to web hosting
Need to use an ftp client such as FileZilla or UltraEdit to upload the zip file into your domain name directory.
Do not upload the file into the moodledata subdirectory
When you unzip the moodle-2.4.1.zip file, it will create the moodle directory and all the necessary application data.
Example, ftp.ccsdcurriculum.com and enter the ftp account info above for the username and password.
Then use File Manager of SmarterASP.NET Control Panel to unzip the moodle-2.4.1.zip file.
PHP_INI_USER can be set in user scripts like ini_set() or in .user.ini
PHP_INI_PERDIR can be set in php.ini, .htaccess, httpd.conf or .user.ini
PHP_INI_SYSTEM can be set in php.ini or httpd.conf
PHP_INI_ALL entry can be set anywhere
ini_set("post_max_size", "128M");
ini_set("upload_max_filesize", "128M");
ini_set('memory_limit', '512M');
Create config.php
edit the existing ccsdcurriculum.com/moodle/config-dist.php and save as config.php in the same directory. I'm using UltraEdit which gives me the ability to edit and automatically save the file on the server, don't have to manually ftp the each time, big time savings.
edit lines 41 - 47 with the SmarterASP.NET specific connection string
$CFG->dbtype = 'mysqli'; // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = 'MYSQL5003.Smarterasp.net'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'db_991088_moodcur'; // database name, eg moodle
$CFG->dbuser = '991088_moodcur'; // your database username
$CFG->dbpass = 'Abcd1234'; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
Other variables must be defined as follows, line 97 for wwwroot, line 113 for dataroot (use SmarterASP.NET File Manager to find the full path to your domain name, in this case it is h:\root\home\jefferyjjensen-001\www\ccsdcurriculum.com)
it appears wwwroot works with both www.ccsdcurriculum.com/moodle and ccsdcurriculum.com/moodle, I'm not sure if one is more right/correct than the other.
if you type in the wrong path to dataroot, will get an error like this:
Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
test connection with MySQL phpMyAdmin
login to SmarterASP.NET control panel
Hosting Control Panel → Database Manager → MySQL phpMyAdmin. Use the following login creditials
Server = MYSQL5003.Smarterasp.net
Username = 991088_moodcur
Password = Abcd1234
if getting error number 1045 Cannot log in to the MySQL server, double check your Server name is correct, in my case it was wrong.
the database should be blank, that is no tables in it.
might need to notify SmarterASP.NET to enable the following php_extensions
soap extension which is useful for web services and some contrib modules
Intl extension which is used to improve internationalization support, such as locale aware sorting
UPDATE - on 2/21/2013 Ailen, SmarterASP.NET staff member globally enabled the PHP soap and intl extensions, so you shouldn't see any warning messages on the server checks.
click the Continue button
Installation Timeout Error
If you get this error, then need to have SmarterASP.NET admins edit the php.ini file and change the max_execution_time from default of 30 to 600 (seconds I believe). When set to 600, I was able to get Moodle to install without getting the HTTP Error 500.0 message.
wait about 2-4 minutes while the approximately 305 Moodle tables are imported into the Moodle MySQL database
HTTP Error 500.0 - Internal Server Error. C:\php54\php-cgi.exe - The FastCGI process exceeded configured request timeout.
You can edit the fcgiext.ini file directly and then restart IIS. Alternatively you can install the Microsoft PHP Manager for IIS and use it to manage your PHP installation. Using PHP Manager for IIS to Setup and Configure PHP
This step is creating the primary site administrator. Verify information is correct because this user cannot be removed from the site administrator role. See
Site administrators
Enter the following
General Username (lower case only)
Password (at least 8 characters with at least 1 digit, 1 lower case letter, 1 upper case letter and 1 non-alphanumeric character)
First name
Surname/Family Name
Email address
City/town
Country
all the other info is optional
click update profile
Installation Front Page Settings
Full site name, such as Clark County School District Class Curriculum Home Page
I have experienced problems with the Moodle install timing out. Here is the steps to change the PHP max_execution_time
run phpinfo script to see what your hosting provider has set the max_execution_time to. The default max_execution_time is 30, I'm guessing this is 30 seconds. I had to submit a support ticket requesting SmarterASP.NET staff to edit the php.ini (can only be edited by the hosting admin) and increased it to 120. Here is a sample of the phpinfo output showing the increase.