2.6.2 2 sites that are somehow linked?!

2.6.2 2 sites that are somehow linked?!

by Wendi Daniels -
Number of replies: 9
I have 2 Moodle sites, and I am trying to set up the terms of use, privacy and the like. I set this up in site administration > appearance > themes > theme settings> custom menu items. Here is the problem: If I change the url path in one, it automatically changes it in the other!! How do I unlink the sites so this does not happen?
Average of ratings: -
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Ken Task -
Picture of Particularly helpful Moodlers

Custom Menu items are stored in the mdl_config table of the database per moodle site.

select * from `mdl_config` where `name` like "custommenuitems"

Are both sites pointed to the same database?   Check the config.php file for both sites to confirm they are not.

Might also purge the cache on both sites ... not supposed to happen but ...

'spirit of sharing', Ken


In reply to Ken Task

Re: 2.6.2 2 sites that are somehow linked?!

by Wendi Daniels -
What does this mean? "select * from `mdl_config` where `name` like "custommenuitems""
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Ken Task -
Picture of Particularly helpful Moodlers

It's an sql query that will show the links of custommenus.

Run it via phpmyadmin or whatever you use for the DB.   Also run it against the databases for the two sites where the links appear the same.

Site A: uses moodleSiteA DB ... run query vs that database.  Note the URL's in the custommenus.

Site B: uses moodleSiteB DB ... run same query vs that database.

If Site A and Site B both use the SAME database, that's why the custommenus are the same on both sites.

'spirit of sharing', Ken

In reply to Ken Task

Re: 2.6.2 2 sites that are somehow linked?!

by Wendi Daniels -
Ken, that's great and I appreciate your help. At the same time, I do not understand the techy lingo. Could you word that in plain language, please?
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Wendi Daniels -
Update... We have found that in config.php both sites have the same "dataroot" file. How do I break this up?
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Wendi Daniels -
To add to this scenario... I have one Moodle site on BlueHost. I have added two other Moodle sites as addons. These two addons are connected somehow. It would have been done through the front end (through Moodle, rather than through cpanel, PMA or other). BlueHost and I still cannot figure it out. It seems to be on the front end, and I cannot what I did to connect them.
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, we'll forget about the 'techie lingo'.  Maybe a suggestion that one learns how to use PMA [assume that means phpmyadmin] to use those sql queries shared earlier).

However, concentrating on this last posting.

"it would have been through the front end (through Moodle, rather than through cpanel, PMA, or other)"

If Bluehost can't figure it out then ....

But ... will pose some simple questions:

Assuming you installed them all ... all three ... and that you did not use any app provided by Bluehost to install ... basically *each* moodle site requires a unique code directory, a unique data directory, and a unique database.

So ... three moodle sites - A, B, C

Siite A

domain is moodlesiteA.somenet.net

code directory is in /customer/webrootsiteA/

data directory is in /customer/siteAmoodledata

Site B

domain is moodlesiteB.somenet.net

code directory is in /customer/webrootsiteB/

data directory is in /customer/siteBmoodledata

Site C

domain is moodlesiteC.somenet.net

code directory is in /customer/webrootsiteC/

data directory is in /customer/siteCmoodledata

or something like that.

Compare the config.php file of each site ... siteA, siteB, and siteC ... have a feeling you'll see more than one is pointed to same data, same database at least.

What does 'your space' on Bluehost look like?

Ken


In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Ken Task -
Picture of Particularly helpful Moodlers

Before anyone could begin to suggest how to fix what appears to be 3 instances of Moodle on a single Bluehost domain that are mis-configured, more specific information about how those instances were installed .... ie, into what directories, etc.. and investigation of *each* config.php file for *each* instance to see where those are pointed to ... wwwroot, data directory, AND the DB to be used for *each* site.

The following is a representation ... it is probably NOT the same as what is in your space on Bluehost - but this should give you something to work from:

wtunersites - your home folder/directory

Listing below:
Directory permissions/ownership
Size
Owner
Group
name of folder

drwxr-xr-x  4 wturner  wturner  moodle - url for this is http://yourdomain/
drwxr-xr-x  4 wturner  wturner moodle2 - url for this is http://yourdomain/moodle2
drwxr-xr-x  2 wturner  wturner moodle2data
drwxr-xr-x  4 wturner  wturner moodle3 - url for this is http://yourdomain/moodle3
drwxr-xr-x  2 wturner  wturner moodle3data
drwxr-xr-x  2 wturner  wturner moodledata

wtunersites/moodle:
total 0
-rw-r--r--  1 wturner  wturner config.php
-rw-r--r--  1 wturner  wturner moodlecodeformoodleinhere

wtunersites/moodle2:
total 0
-rw-r--r--  1 wturner  wturner config.php
-rw-r--r--  1 wturner  wturner moodlecodeformoodle2inhere

wtunersites/moodle2data:

wtunersites/moodle3:
total 0
-rw-r--r--  1 wturner  wturner config.php
-rw-r--r--  1 wturner  wturner moodlecodeformoodle3inhere

wtunersites/moodle3data:

wtunersites/moodledata:

Looks like attachment?  (or sort of).



Attachment wturnersites-representation.png
Average of ratings: Useful (1)
In reply to Wendi Daniels

Re: 2.6.2 2 sites that are somehow linked?!

by Ken Task -
Picture of Particularly helpful Moodlers

Is this (sort of) what you did? (attachment)

If so, am surprised that two of them are working at all!!!

The fix is 'technical' and am not sure the 'fix' will actually 'fix' depending upon what one finds when inspecting the config.php files for all sites and the directory/folder structure.   Could involve making a copy of a data directory for one instance and creating a new instance of that data directory by another name.   Same for a db ... depending upon info in config.php file comparison.

The site at domainroot is probably your original in production Moodle site.   That site needs to remain.   The other instances of Moodle are in folders of their own *inside* the domainroot.

Please use whatever control panel/tool you have to take a screen shot of your 'space'.

And provide clips - copy and pasted text - with labels (moodle, moodle1, moodle2) of the config.php files lines that follow giving:

$CFG->wwwroot   = 'http://example.com/moodle';

$CFG->dataroot  = '/home/example/moodledata';

$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'moodle';

Above are examples from config-dist.php file.

If two instances are 'tinker' sites and not intended for production, you *might* be better off removing them.   But be careful IF one of the tinker sites is pointed to the SAME DB and/or data directory for the production instance ... the one you want to keep.

'spirit of sharing', Ken

Attachment isthishowsitesareinstalled.png