1 database multiple sites

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
billyjimbob
New Member
New Member
Posts: 5
Joined: Fri Jun 13, 2008 1:05 am

1 database multiple sites

Post by billyjimbob »

Hi,

I've installed version 1.3 on one of my sites and I read that you can use the same database for another installation and this is what I want to do.

I've installed a version of 1.3 on www.mydomainname.com and it works well but I also want to install another instance of it at
www.mydomainname.com/newinstance and have them both run from the same database with different prefixes to identify the different instances.


I uploaded the install files to www.mydomainname.com/newinstance went through the install process and was careful to enter the correct database information and location of where this new instance could be found and made sure to unclick the delete table.  I changed the prefix of the database from cms_ to nic_ and it's on the last page of the install that it fails.  I get the following error


Updating hierarchy positions...[done]

Setting up core events...[done]

Installing modules...
Fatal error: Call to a member function on a non-object in
/htdocs/newinstance/install/lib/classes/CMSInstallerPage5.class.php on line 182

The code around where it has the error is

Code: Select all

$query = "SELECT * FROM ".cms_db_prefix()."modules WHERE module_name = ?";
				$dbresult = $db->Execute($query, array($modulename));
				$count = $dbresult->RecordCount();
When I check the database to see if any new tables have been created the only table is an event table and this table has the appropriate nic_ prefix (note the cms_ tables from the previous install are still there).

Any ideas what is going wrong?  As one table has been created with the correct new prefix that doesn't seem to be the problem.

Thanks in advance
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: 1 database multiple sites

Post by Dr.CSS »

The thing you unchecked was for creating the tables for the DB, new ones with the nic_ prefix, it won't mess with the existing cms_ prefix tables...

From http://wiki.cmsmadesimple.org/index.php ... ck_Install...

Note 1: Uncheck the box Create tables if you use an existing database with CMS Made Simple content that you don't want to remove (for example if you upgrade or repair). Otherwise leave as is. Tables from other systems, like a phpBB forum for example, will be unchanged and not dropped or deleted.
billyjimbob
New Member
New Member
Posts: 5
Joined: Fri Jun 13, 2008 1:05 am

Re: 1 database multiple sites

Post by billyjimbob »

Thanks.  That worked well.  I thought you unchecked the box if you were adding to the DB but I see I read it wrong.  Very much a rookie mistake.  All working well now. 
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: 1 database multiple sites

Post by Dr.CSS »

Locked

Return to “[locked] Installation, Setup and Upgrade”