Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Cyrelle Gerson -
Number of replies: 15

After searching these forums and GoDaddy support, I was finally able to successfully install Moodle 2.2 to my shared hosting account. I am listing the steps here to assist anyone else who might face this challenge.

Please note that I have a small, personal site that I use for clients to review elearning courses during the development process of projects. My GoDaddy account uses Windows IIS7, PHP 5.3 and MySQL.

To use this method you will need to know how to access your GoDaddy site via FTP.

1. Download the Moodle 2.2.2+ zip file to local Windows PC and unzip.

2. Edit the install.php file as instructed in the forum post found at http://moodle.org/mod/forum/discuss.php?d=200872, which states:

       Probably the only way to get Moodle 2.0 install right now is to hack the install script. Find the place in install.php where it says

        } else if (is_dataroot_insecure()) {

       and change it to

       } else if (false and is_dataroot_insecure()) {


3. Login to your GoDaddy account and open the Hosting Control Center for your web hosting account. Copy the absolute hosting path information shown on the Hosting Dashboard and save it.

4. Go to the Content section of the Hosting Control Center and open the FTP File Manager. Create a moodle subdirectory under the root. Edit its permissions to allow read and write access.

5. Create another subdirectory that will ultimately hold the moodledata directory under the root directory. You can name it anything you want. I will call it "holder" for this explanation. Edit the permissions of the "holder" directory to allow read and write access.

6. Return to the content section of the Hosting Control Center and open the IIS Management page. Create a new virtual directory called "holder" (or whatever name you used in step 5).  Edit the settings so that Anonymous Access and Directory Browsing are NOT allowed. With these settings the "holder" directory will not be accessible through a web browser.

7. Go to the database section of the Hosting Control Center and click on MySQL to create a new database for your Moodle installation. Be sure to keep a copy of the dbname, dbuser, dbhost, and dbpass.

This step should complete your preparation of your GoDaddy site to be ready for Moodle.

8. Using FTP upload all of the Moodle files that you unzipped in step 1 (including the install.php that you edited in step 2) to the moodle directory on your GoDaddy site.

9. In your web browser go to the URL for your moodle directory (such as http://www.mysite.com/moodle). The install.php script should start running. Be sure to put in the correct path and directory information for your site and for your moodledata directory (which in this example would be something like d:\myhost\myplace\html\holder). (Note: In this way you are putting the moodledata directory into a location that is not accessible via browser.)

10. Follow the onscreen instructions to fill in the other information where requested.

I think this lists all of the steps that I took, however, if you try this method and it doesn't work, please post corrections to the forum.

Average of ratings: -
In reply to Cyrelle Gerson

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Thanks for the tip Cyrelle, but you think this may be better if it was placed into a Moodle Doc? I suggest this as eventually, this item will slide down the page, then the next page and so on, until people will forget it there. Seaches may reveal it, but then if GoDaddy updates or changes something, then it may no longer be relevant. In Docs, it is kept current by continual editing, well it can happen, or as it becomes dated, someone else may edit it to again, be accurate. If you do it, then you are recognised as the author, not anyone who may copy this to the Docs, and that, I think, is an accolade for you, not someone else. Think about it.... (but Nelson Mandella did say that it is amazing how much can be acieved if we do not worry too much about who gets the credit.)

Average of ratings: Useful (1)
In reply to Colin Fraser

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Cyrelle Gerson -

Thank you for the suggestion, Colin. I will see if I can also place this in the Docs, and hopefully, others will edit it as needed to keep it current.  I hope that it may save others lots of time, if they are using GoDaddy (or maybe another hosting service that has similar restrictions/features).

In reply to Cyrelle Gerson

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Dan Lombardi -

I did everything you said, but I get an error that says "Parse error: syntax error, unexpected T_VARIABLE in D:\hosting\8808021\html\moodle\config.php on line 127"

that line is the directory permissions line of the config.php I tried setting it to 0777 but it didnt' make a difference

Any suggestions?

In reply to Dan Lombardi

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Blaise Alleyne -

Can you paste lines 126-128 of config.php? Looks like there might be a typo or something.

In reply to Dan Lombardi

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Try 0775 that works sometimes...

In reply to Colin Fraser

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Berenice Perez -

Hi, hello, I have done everything you say about installing Moodle in a godaddy.com webhosting but I am having an error that I think is imposible to solve, please if you have any suggestions I really would appreciate it. Take a look at this:

* The primary domain is www.misiones.me , but I created a submain called diplomado.misiones.me, that it exists under  /diplomado 

* So I first created a directory under that path called /diplomado/htdocs, then  I uncompressed moodle there, so the final path should be  /diplomado/htdocs/moodle

* when I tried to install moodle following the instructions, an error came up and have no idea what to do

http://diplomado.misiones.me/htdocs/moodle/install.php

 

This is what is showing:

 

Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

Warning: require_once(__DIR__/database_column_info.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/database_column_info.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

In reply to Cyrelle Gerson

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Berenice Perez -

Hi, hello, I have done everything you say about installing Moodle in a godaddy.com webhosting but I am having an error that I think is imposible to solve, please if you have any suggestions I really would appreciate it. Take a look at this:

* The primary domain is www.misiones.me , but I created a submain called diplomado.misiones.me, that it exists under  /diplomado 

* So I first created a directory under that path called /diplomado/htdocs, then  I uncompressed moodle there, so the final path should be  /diplomado/htdocs/moodle

* when I tried to install moodle following the instructions, an error came up and have no idea what to do

http://diplomado.misiones.me/htdocs/moodle/install.php

 

This is what is showing:

 

Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

Warning: require_once(__DIR__/database_column_info.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/database_column_info.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/r/o/c/rockysalmab/html/diplomado/htdocs/moodle/lib/dml/moodle_database.php on line 27

In reply to Berenice Perez

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Guillermo Madero -

Hi Berenice,

About the "Use of undefined constant __DIR__ - assumed '__DIR__'" error, that means that you are using a PHP version lower than 5.3, when you should be using 5.3.2 at least.

Depending on the Moodle version you are trying to install, you should check that all your Web components (i.e. MySQL and PHP) meet the minimum requirements:

http://download.moodle.org/

On another topic, but related to what you described, is your "diplomado" directory going to have other kind of applications under it, like a blog or a forum for example, or do you want it only to hold Moodle? If you only want it to have Moodle, I think it would be best if you moved everything under the Moodle folder two levels up, as this would shorten your URL.

This way, your structure would look like this:

/home/content/.../html/diplomado/admin
/home/content/.../html/diplomado/auth
/home/content/.../html/diplomado/theme
/home/content/.../html/diplomado/config.php

And you only would need to go to: http://diplomado.misiones.me/ to have access to your Moodle installation.

In reply to Guillermo Madero

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Berenice Perez -

HI Guillermo

Thanks a lot, I really appreciate your help. You are totally right, the PHP version was totally wrong. The PHP version needed should be PHP 5.3. Another thing is the MYSQL version, in a web shared hosting at GoDADDY.com they provide an older version 5.0.X , so there is no way that you can install the latest version of Moodle (2.3). You have no idea how many tickets I post to godaddy, once to change the PHP version, other tu upgrade the MYSQL, etcetera. At the end I had to install Moodle 2.2 so in that way it is compatible with MYSQL 5.0.x, and I finally was able  to install Moodle at my hosting.

Thanks a lot, for taking time to answer this question

In reply to Berenice Perez

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Are you using GoDaddy's shared hosting plan, or a Virtual Dedicated Server?  Around two years ago, I got a VDS and wanted to run Moodle 2.0 on it.  I ended up paying GoDaddy $50 to upgrade PHP and mySQL.  It was well worth the price.

More recently, I purchased a newer VDS with CentOS6, and the versions of PHP and mySQL are fine.

(PHP Version 5.3.15, MySQL 5.1.63, CENTOS 6.2, Apache 2.2.22).

I don't think you have much help when using a hosted account, you get what they give you.

You can also try another company.

In reply to Cyrelle Gerson

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Pavithran Nambiar -

Hi, Hope you are keeping well, I followed the step you given above..but in installation when I click the next button from the screen of licence and agriment I am getting the below error.

Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting.


Please see the below link for the same

http://lms.woodpeckerdigital.com/lms/admin/index.php?agreelicense=1&confirmrelease=1&lang=en

 

Please help me regard this

Warm Regards

Pavi

In reply to Cyrelle Gerson

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Hal D'Arpini -

Hi,

I, too, have a shared hosting account with godaddy and I did all the steps you listed above, but I'm still getting the "Dataroot location is not secure" message during the install. 

Specifically, I followed steps 5 and 6 and set up a moodle data subdirectory under the root of my website and created a virtual directory without anonymous access or directory browsing.  I even browsed out to the subdirectory to test that it wasn't accessible and got the message "401 - Unauthorized: Access is denied due to invalid credentials." 

The only thing different from the instructions is that the root of my website is in a subdirectory of the root -- D:\hosting\10150264\html\english_training_services\moodledata -- rather than in the root of the primary domain itself.  I'm not sure that it matters, though, since I was able to run the installation from the other subdirectory under the root, per instruction 9. 

Another thing may be that I'm trying to run the latest version, 2.4, although I'm wondering if that matters when it comes to testing if my data folder is accessible from a browser or not. 

It makes me wonder how exactly the install tests whether a directory is or isn't accessible via the web.  And it's unfortunate that the install imposes this requirement rather than allowing users to determine for themselves if they want to assume the risk of an "unsecure" data folder.

In any event, any guidance would be appreciated, and I'll be happy to provide more detail if necessary.

In reply to Hal D'Arpini

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

If the folder html is your website folder, the moodledata folder should not be where it is.  It should be at D:\hosting\10150264\moodledata.

I can't say that I am an expert in this sort of thing, but you might give it a try.  I think this mistake is made often enough, and it's really a big mistake, so the coders of Moodle created a check and an error message.

Do you know if your shared hosting account had the correct versions of php, and mySQL? I think Moodle 2.4's requirements are the same as 2.3.3+, but you should check.  Do you know how to create an info.php file?

I assume that you might know how to answer these questions and do what I suggest, but let me know if you don't and need some guidance.

 

In reply to Rick Jerz

Re: Success installing Moodle 2.2 to GoDaddy Windows shared hosting account

by Hal D'Arpini -

I was able to solve my original problem and advance to the next screen.  It happened after I used my FTP File Manager on my cpanel to set the read and write permissions on the data folder (or maybe the virtual folder I'd set up in IIS with anonymous access and directory browsing blocked kicked in at that exact moment -- who knows?). 

In any event, right after I was able to get past the dataroot error message, something bizarre happened.  I received a 500 error message and now I'm in the same situation I was before with the "Dataroot location is not secure" message. 

I've started a new post on this new problem at https://moodle.org/mod/forum/discuss.php?d=217679