Installing on remote server

Installing on remote server

by Malcolm Johnson -
Number of replies: 6

I'm installing Moodle on my web site hosting server, but cannot get past first base with the config.php setup - I keep getting the message "failed opening required 'moodle/lib/setup.php'".

Clearly I'm doing something wrong with the parameters, e.g. how do I know what the OS directory path is on a remote server? What exactly should I be typing for the dataroot variable?

I know these must be real dumbo questions, but I'd greatly appreciate practical assistance!

 

Average of ratings: -
In reply to Malcolm Johnson

Finding out paths to put in config.php for dirroot and dataroot

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The best way is to use the Unix command "pwd" from a shell.

If you can't use the shell, then one quick trick you can use is to point your browser directly at moodle/lib/setup.php ... it will give an error, but in the error it usually prints the full path, eg /aaa/bbbbb/ccccc/moodle/lib/setup.php

Just use everything before the /lib/setup.php for the dirroot variable, eg /aaa/bbbbb/ccccc/moodle

Assuming you put the moodledata directory next to your moodle directory, then the dataroot path would be: /aaa/bbbbb/ccccc/moodledata
In reply to Martin Dougiamas

Re: Finding out paths to put in config.php for dirroot and dataroot

by Malcolm Johnson -

Thanks for your instant response with the tip, Martin - it solved the problem.

Now I'm at the next stage, and I've hit a problem with MYSQL set up.  The Assignment, Assignment Submission and Configure tables have been created OK, but nothing else, and I get a string of error messages to do with the fact that the 'xxxxx.log_display' table doesn't exist.

Again, I'd be most grateful for any hints as to where I should look to solve this one!

In reply to Malcolm Johnson

Re: Finding out paths to put in config.php for dirroot and dataroot

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Usually it's all or none - the behaviour you describe is very wierd. Try dropping all the tables in that database and starting over. If you get error messages again, cut and paste the first few in a message here.
In reply to Martin Dougiamas

Re: Finding out paths to put in config.php for dirroot and dataroot

by Malcolm Johnson -

I dropped all the tables, and started over. 

The first run of Moodle then produced the following:

Upgrading database Login
Home -> Upgrading database  

=---- (mysql): CREATE TABLE `config` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `value` varchar(255) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) COMMENT='Moodle configuration variables'; -----

Success

Created a new table 'config' to hold configuration data

=---- (mysql): DELETE FROM `modules` WHERE `name` = 'chat' ----- 1146: Table 'ptbijaa.modules' doesn't exist

Error

Another string of error messages followed, telling me that other tables didn't exist.

Then, on the second run of Moodle, I got the following:

Setting up module tables Login
Home -> Setting up module tables  

=---- (mysql): CREATE TABLE `assignment` ( `id` int(10) unsigned NOT NULL auto_increment, `course` int(10) unsigned NOT NULL default '0', `name` varchar(255) NOT NULL default '', `description` text NOT NULL, `format` tinyint(2) unsigned NOT NULL default '0', `resubmit` tinyint(2) unsigned NOT NULL default '0', `type` int(10) unsigned NOT NULL default '1', `maxbytes` int(10) unsigned NOT NULL default '100000', `timedue` int(10) unsigned NOT NULL default '0', `grade` int(10) NOT NULL default '0', `timemodified` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`)) COMMENT='Defines assignments' -----

Success

=---- (mysql): CREATE TABLE `assignment_submissions` ( `id` int(10) unsigned NOT NULL auto_increment, `assignment` int(10) unsigned NOT NULL default '0', `user` int(10) unsigned NOT NULL default '0', `timecreated` int(10) unsigned NOT NULL default '0', `timemodified` int(10) unsigned NOT NULL default '0', `numfiles` int(10) unsigned NOT NULL default '0', `grade` int(11) NOT NULL default '0', `comment` text NOT NULL, `teacher` int(10) unsigned NOT NULL default '0', `timemarked` int(10) unsigned NOT NULL default '0', `mailed` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`id`)) COMMENT='Info about submitted assignments' -----

Success

=---- (mysql): INSERT INTO log_display VALUES ('assignment', 'view', 'assignment', 'name') ----- 1146: Table 'ptbijaa.log_display' doesn't exist

Error

=---- (mysql): INSERT INTO log_display VALUES ('assignment', 'add', 'assignment', 'name') ----- 1146: Table 'ptbijaa.log_display' doesn't exist

Error

I'm perplexed!

In reply to Malcolm Johnson

Re: Finding out paths to put in config.php for dirroot and dataroot

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK, that's REALLY strange ... for some reason it things it's upgrading really old code.

Can you try using the latest nightly version?

http://moodle.com/mod/resource/view.php?id=8

If that doesn't work email me (privately) with your URL and any access you're comfortable giving me to have a closer look at your install environment.
In reply to Martin Dougiamas

Re: Finding out paths to put in config.php for dirroot and dataroot

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Just for the record, it turned out that the database already contained some other tables, so the database install got confused.