Installing 2 moodles on one server?

Installing 2 moodles on one server?

by David Nash -
Number of replies: 13
Hi,
Is it possible to install two independent moodle Lms's on one server?

I have downloaded 1.9.4 and it has an executable Start Moodle.exe

Will this affect my existing installation?

I am already running WampServer 2.0, will the packages Apache, MySql with this Moodle release have an effect on the installed apps on the server?

cheers
Average of ratings: -
In reply to David Nash

Re: Installing 2 moodles on one server?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Looks like you downloaded the all-in-one windows packages. Those are OK for trying Moodle out, but you should not use them on a real server. See Windows_installation for how to do a 'proper' installation. If you do that, you can easily install lots of different Moodles on one server.
In reply to Tim Hunt

Re: Installing 2 moodles on one server?

by David Nash -
thanks for the info.

I opened the zip file and in the server folder i found the moodle directory, so i just copied that out and it update to 1.9.4+ ok.

The problem I have though is putting 2 moodles in two different folders on the same webserver.

The Config.php files keep mixing each other up.
In reply to David Nash

Re: Installing 2 moodles on one server?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The whole point of config.php is to make multiple Moodles on one server possible.

For each Moodle you need a separate 'moodle' folder, a separate 'moodledata' folder, and a separate database (or different $CFG->prefix-es in the same database).

For example, on my development machine, I have both Moodle 1.9 and 2.0dev installed (plus about 5 more version).

I have folders

.../moodle (a copy of the Moodle 2.0 dev code)
.../moodledata

.../moodle19 (a copy of the Moodle 1.9.4+ code)
.../moodle19data

And I have one database set up.

In .../moodle/config.php I have

$CFG->wwwroot = 'http://.../moodle';
$CFG->dirroot = '.../moodle';
$CFG->dataroot = '.../moodledata';
$CFG->prefix = 'mld_';

(as well as the database password, and other usual stuff) and in .../moodle19/config.php I have

$CFG->wwwroot = 'http://.../moodle19';
$CFG->dirroot = '.../moodle19';
$CFG->dataroot = '.../moodle19data';
$CFG->prefix = 'm19_';

and the usual stuff.


I hope that makes it clear.
In reply to Tim Hunt

Re: Installing 2 moodles on one server?

by David Nash -
Thanks for the answers I got it to work now.

The issue I was having was that the Admin/index.php page is always blank and the Notification link is highlighted in Red. There are no error messages, just a blank page.

I have 1.9.3 running as the "working" lms and now I have 1.9.4+ running as a test site on the same machine, but both are doing the same thing, as in that neither moodles are displaying the Admin/index.php page.

I have an identical moodle of 1.9.3 running on a totally separate test machine, and these errors do not occur...so it must be something on the main Web server causing this.


What is happening though on all three Moodles is that I cannot generate any reports from the 1st January 2009 to present. Even though there are records I get the message that no records are available for those dates.

Loads of puzzling issues I am trying to resolve, yet a fresh install of 1.9.4+ is displaying the same problems as the existing moodle 1.9.3
In reply to David Nash

Re: Installing 2 moodles on one server?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Turn on Debugging - directly in config.php if you cannot get to the admin screen. There is probably an error message.
In reply to Tim Hunt

Re: Installing 2 moodles on one server?

by David Nash -
Cheers,

The error that comes up is:

Fatal error: Cannot redeclare domxml_new_doc() in .......\auth\cas\CAS\domxml-php4-php5.php on line 52



In reply to David Nash

Re: Installing 2 moodles on one server?

by David Nash -
Can anyone shed a light on the cause of this error please?
In reply to David Nash

Re: Installing 2 moodles on one server?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, auth/cas/CAS/domxml-php4-php5.php seems to be some horrible hack to make some code that is PHP4-only work in PHP5 - or is that the other way round, the logic in auth/cas/CAS/CAS.php that includes it is confusing me.

You could just try commenting out the line
require_once(dirname(__FILE__).'/domxml-php4-php5.php');
in auth/cas/CAS/CAS.php. That will either fix thigns, or make them worse wink
In reply to Tim Hunt

Re: Installing 2 moodles on one server?

by Scott Karren -
Since Wampserver is a Windows all in one app, you might try commenting out the php_domxml.dlll extension in the php.ini file. I have seen it pull out some fairly strange errors when enabled.

Scott Karren
In reply to Scott Karren

Re: Installing 2 moodles on one server?

by David Nash -
thanks for the replies, I'll try this out today
In reply to David Nash

Re: Installing 2 moodles on one server?

by David Nash -
I commented out the line and the Admin page kicked back in again, thanks for the help.

I suppose I'll have to do it again to update to 1.9.4+ on the active server lms.....I'll think about it!
In reply to David Nash

Re: Installing 2 moodles on one server?

by David Nash -
The other issue is still there though.

I still cannot generate reports of Courses for 2009, it still stops at December 2008.

Anything I need to check?

Could this starnge message be linked to it?

"Your site has been registered with moodle.org, please consider updating the registration if significant changes happened since your last update, on Sunday, 7 September 2014, 04:50 AM"


September 2014 was my last update???



Debugging register.php brought up:

A required parameter (sesskey) was missing

Stack trace:

  • line 1662 of lib\deprecatedlib.php: call to debugging()
  • line 308 of lib\moodlelib.php: call to error()
  • line 1788 of lib\moodlelib.php: call to required_param()
  • line 14 of admin\register.php: call to confirm_sesskey()


cheers