installation hanging up

installation hanging up

by Henry Foster -
Number of replies: 17

I am trying to install 2.2 on a rental server. I already had a moodle installed on the same server; that moodle began as 1.9 and was upgraded successfully to 2.2, but I want to try putting a clean install of 2.2 in its place. I completely removed the old moodle, including the database, and started from scratch, but the installation always hangs up after the server checks screen. "Installation" and "System" are displayed in the browser, and then nothing more.

The php.ini file after hangup looks like this:

<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = '******';
$CFG->dbuser    = '******';
$CFG->dbpass    = '******';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbsocket' => 0,
);

$CFG->wwwroot   = 'http://moodle.abiloon.com';
$CFG->dataroot  = '/home/abiloon/public_html/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

$CFG->passwordsaltmain = '********';

require_once(dirname(__FILE__) . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!

This differs in a few ways from the php.ini of the previous (successful) installation: 

<?php  /// Moodle Configuration File 

unset($CFG);

$CFG = new stdClass();
$CFG->dbtype    = 'mysql';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = '******';
$CFG->dbuser    = '*******';
$CFG->dbpass    = '******';
$CFG->dbpersist =  false;
$CFG->prefix    = 'mdl_';

$CFG->wwwroot   = 'http://moodle.abiloon.com';
$CFG->dirroot   = '/home/abiloon/public_html/moodle';
$CFG->dataroot  = '/home/abiloon/public_html/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 00777;  // try 02777 on a server in Safe Mode

$CFG->passwordsaltalt1 = '*********';
$CFG->passwordsaltalt2 = '*********';
$CFG->passwordsaltmain = '**********';

require_once("$CFG->dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>

Does this give any clues as to why the fresh installation is not working?

Average of ratings: -
In reply to Henry Foster

Re: installation hanging up

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
$CFG->dirroot is an important parameter which is missing. Check how you missed that one.
In reply to Visvanath Ratnaweera

Re: installation hanging up

by Henry Foster -

Yeah, but even when I add that line manually, the installation hangs up in the same place.

In reply to Henry Foster

Re: installation hanging up

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Does your rental server satisfies all the software requirements: http://docs.moodle.org/22/en/Installing_Moodle#Software ?
In reply to Visvanath Ratnaweera

Re: installation hanging up

by Henry Foster -

Yes, as far as I know. As I have mentioned, I already had 2.2 successfully installed on the same server in the same directory. There should be no problem with software requirements.

In reply to Henry Foster

Re: installation hanging up

by Ken Task -
Picture of Particularly helpful Moodlers

It appears the files/folders for Moodle are currently located at your web server root: /home/x/public_html/ and not in /home/x/public_html/moodle/ as before.

Is there another index.html or index.php file or .htaccess/php.ini located in /home/x/public_html/?

If there was a .htaccess or php.ini, did it set max limits for scripts to run and memory limits?  Install page is available and appears to simply time out - no error reported.

Also, the moodledata folder shouldn't be in web root ... directly accessible via the web ... ie, http://site/moodledata/

Permissions on public_html?  Permissions on all folders/files contained therein?

'spirit of sharing', Ken

In reply to Ken Task

Re: installation hanging up

by Henry Foster -

Thanks, as always, for the advice. I had just noticed, too (after years of using it that way!), that my moodledata folder was located inside public_html. Luckily that has never been abused. I have now relocated it. The moodle folder itself is in public_html, and I have added the line 

$CFG->dirroot = '/home/abiloon/public_html/moodle';

to the config.php, because for some reason it doesn't get added automatically during installation.

All the folder permissions seem to be correct. The moodle folder itself is 0755 - is that how it should be?

There seem to be no .htaccess or php.ini files restricting script memory or time limits.

I just can't figure out why this isn't working!

In reply to Henry Foster

Re: installation hanging up

by Ken Task -
Picture of Particularly helpful Moodlers

Might want to review how one installs on the 'rental server'.  From descriptions/paths appears to be on a shared host.  Does hosting provider have any FAQ or directions for customers as to settings/permissions on files/folders?  Disclosing the hosting provider might give a clue as not all hosting providers do things the same way.

How was it installed?  Script from provider?  The FTP method?  If FTP, were *all* files/folders uploaded?

One of the reasons a config.php file is not written is permissions on the folder to which the installer will write the config.php file.  Permissions may differ from shared host to shared host.  When viewing the files/folders on the moodle folder, what are the permissions (including owner and group)?

For example, on a standalone (not shared host) the moodle directory could have:

drwxr-xr-x apache apache moodle

Directory moodle (the 'd' above) owned by apache user and apache group.  The first rwx (left to right) indicates the owner (apache) has read, write, and execute permissions.  The second r-x means the group (the second apache) has read and execute.  The third r-x means all others have read and execute.

Also check permissions on the 'site' directory ... the folder in which the moodle folder resides.

Permissions need to be set recursively - ie, not just the moodle folder, but all folders and files contained therein.

'spirit of sharing', Ken

In reply to Ken Task

Re: installation hanging up

by Henry Foster -

Hmm, still not working. It is a shared host, and the provider is SiteGround. I have another, larger moodle also on a SiteGround server (a "semi-dedicated" server). It is easy to manage directory permissions through the CPanel, so I checked the permissions of the moodle directory itself, and it is rwx/r-x/r-x (755) as it should be, and so are all the directories in it. The directory in which moodle resides, public_html, was set to rwx/r-x/--- (750). I tried changing that to rwx/r-x/r-x (755) and doing the whole install over from scratch, but it still times out at the same point. Interestingly, on my other moodle, which is located directly in the 'site' directory, public_html, without a moodle directory per se, the public_html directory permissions are set to 750, but it is a fully functional moodle.

The procedure I use to install is to FTP the zipped package directly into the target directory and then unzip it there via the CPanel. This is the procedure I have always used on this server for installations and uploads, and never with any problem.

In reply to Henry Foster

Re: installation hanging up

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, trying to sort this out ... you already have a moodle installed at the web root (the public_html folder) of your SiteGround hosting site.  Correct?

You are trying to install a second moodle instance (a version 2.x) in a folder called 'moodle'.  Correct?

In the initial posting there was a reference to php.ini but what was shown was actually the config.php file.  That just a reference error?

Two Moodle instances **cannot** use the same moodledata folder.  If the first and functioning Moodle uses /home/site/moodledata then the second Moodle instance (the one you are trying to install) must use something else like /home/site/moodle2data

The moodle2data folder must be created manually as the installer script will not create it for you.  It must also have correct permissions.  During installation, the form may show suggestions (what it thinks should be correct) for location of moodledata.  Typically it defaults to /path/moodledata.  You must adjust path to the manually created moodle2data folder.

'spirit of sharing', Ken

In reply to Ken Task

Re: installation hanging up

by Dave Emsley -

...and don't forget to give appropriate access to the moodle2data folder.

In reply to Henry Foster

Re: installation hanging up

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, am confused ... sorry bout that.

Is the moodledata folder from the original/working installation still there and does it contain folders/files?  If so, leave the folder, but delete any/all files contained therein.  Could be the installation is getting confused and thinks it's upgrading an exsisting installation.

'spirit of sharing', Ken

In reply to Ken Task

Re: installation hanging up

by Henry Foster -

Hi

Thank you for sticking with this and trying to help me sort this thing out.

I’m sorry I obviously did not explain clearly enough. I have two moodles hosted by SiteGround, but they are different domains, separate accounts. One, KTU-e-learn.net, is for my main school job. It is on a semi-dedicated server because of its relatively higher traffic load. It is located in the web root, so when you access http://ktu-e-learn, you go straight into the moodle. That's why I wrote that there is no moodle folder per se in that installation.

The other moodle is (was) located at my other domain, abiloon.com. This domain is on a shared server. The moodle is (was) located in a folder called moodle in the web root, but I registered a subdomain, so the public path to the moodle folder is not http://abiloon.com/moodle, but rather http://moodle.abiloon.com.

If I mentioned php.ini in my original message, that was a mistake. I was talking about config.php. Later, @Ken asked me to check for .htaccess and php.ini files that might be imposing restrictions, and I did, and there weren't any.

Both moodles started off a few years back as 1.9, and I upraded them over time to reach 2.2. Then, mostly out of curiosity, and so that I could compare the databases of the two installations, I decided to try removing my smaller site (moodle.abiloon.com) and starting over with a fresh install. And that brings us to the present.

Before installing, I really removed everything; the moodle and moodledata folders, and the database. I set up a new database for the new installation, and started from scratch. But the installation just hangs up.

In reply to Henry Foster

Re: installation hanging up

by Ken Task -
Picture of Particularly helpful Moodlers

Love a mystery ... what can I say! ;)  However, searched SiteGround's tutorials and noticed that Moodle was missing from their rather extensive list of package installations.  Was surprised.

Did find one strand of conversation in Moodle.org that was/is exactly what you are seeing.  Problem was resolved by sumitting a toubleticket to SiteGround and they installed for the customer.  Poster, of course, was not informed as to what was done to resolve the issue. :|

You're probably not gonna wanna hear this, but ... at this point I'd say there are three options:

1. try it again from scratch (yeah, I know!)

2. contact SiteGround and have them install ... if you do this, ask for their resolution to the problem.

3. shop for another hosting situation which is more Moodle 'friendly'.

Consider getting a dedicated host where one has full run/control of the machine.  Yes, know it cost more, but sure are fewer headaches and frustrations (IMHO).

Sorry couldn't help you resolve the issue.  Maybe there is a SiteGround customer in this list who would step forward and assist.

'spirit of sharing', Ken

In reply to Ken Task

Re: installation hanging up

by Henry Foster -

Yeah, I'm mostly persisting at this because I want to know why it isn't working. I could just use my backups to go back to the 2.2 upgrade I originally had, but then I would never know what was happening here. It looks like SiteGround is happy to install moodle for people (see http://www.siteground.com/lms-hosting.htm), but as you say, they seem to have no tutorials for how to do it yourself. Mysterious, especially considering that I succeeded in setting up two 1.9 installations on SiteGround servers on my own...

I guess I will have to break down and post a ticket on their helpdesk, and get their help in sorting this out. One thing I can say in their favor is that they have always responded promptly to my inquiries and eventually have solved all of the problems I have had using their servers.

In reply to Henry Foster

Re: installation hanging up

by Dave Murray -

Hi Henry,

If you're looking for the cause there are one or two other possibilities that you might consider.

- You could try unpacking the Moodle upgrade zip file on your laptop to check for corruption. I had problems like that about a year ago.

- You could also check that the PHP upgrade applies to all the directories in your account. Siteground apparently gives you the option of running multiple versions of PHP on different directories in the same account.

How probable these might be in anyone's guess...

Let us know If you do find the answer.

Incidentally, SiteGround had full Moodle tutorials on site when I first signed up. They deleted them about 4 / 5 (?) years ago. Dunno why...

In reply to Dave Murray

Re: installation hanging up (MYSTERY SOLVED)

by Henry Foster -

I gave in and asked the SiteGround helpdesk to install for me (and explain why I couldn't do it myself). They promptly installed it where and how I wanted, and explained:

The installation was performed on another server and moved to that one because of the applied limits on the shared hosting. The Apache web server is set to use 30 seconds timeout which is not suitable only for the installation process. 

So anyone else out there using or thinking of using SiteGround, now we know. 

Thanks Dave M., Visvanath, Dave E. and especially Ken for your advice.

Average of ratings: Useful (2)
In reply to Henry Foster

Re: installation hanging up (MYSTERY SOLVED)

by richa rathore -

Hi Henry,

I am trying to install moodle2.2 on my linux based dedicated server but installation is hanging up at the 'choose your language screen'.

I read the your thread and tried everything bt still the issue persists. I increased my php.ini execution time as well.

Please help.

Thanks

Richa Rathore