Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Support / [help!] Multiple installations setup

#1 2013-02-19 08:51


Because I've encountered many problems with subdomains and wildcards, I decided to setup a multi-instance website. The question is: how to do it?

Can I just install Cotonti 3 times, but make it share the user table (by changing the prefix of table in config)? How about sharing pfs, sessions/users? Do you have any experience with it?

I won't be using different databases, just change prefixes I think.

Added 2 hours later:


This is my setup:
- I have multihost enabled.
- I copied site ID to the installation in subdomain
Do I miss anything?
$db_x= 'cota_'; // Default: cot_, prefix for extra fields' table(s)
$db_xx= 'cot_'; // Default: cot_, prefix for extra fields' table(s)
$db_auth= $db_xx.'auth';
$db_cache = $db_x.'cache';
$db_cache_bindings= $db_x.'cache_bindings';
$db_core= $db_x.'core';
$db_config = $db_x.'config';
$db_groups = $db_xx.'groups';
$db_groups_users = $db_xx.'groups_users';
$db_logger = $db_x.'logger';
$db_online = $db_xx.'online';
$db_extra_fields= $db_x.'extra_fields';
$db_plugins = $db_x.'plugins';
$db_structure = $db_x.'structure';
$db_updates= $db_x.'updates';
$db_users = $db_xx.'users';
$db_pfs= $db_xx.'pfs';
$db_pfs_folders = $db_xx.'pfs_folders';

Added 14 minutes later:

It seems that I have problems with permissions... :/

I need some advice. Hmm... rename some modules to prevent mess?

Added 1 hours later:

Edit2: okay, I separated auths for each site. Only groups, users and pfs tables are shared.

Added 5 minutes later:

I also turned off auth cache.

So far it looks good.

Added 3 hours later:

Hot to log in and out into/from all subdomains? So far I have to log in separately to each subdomain instance.

This post was edited by tensh (2013-02-19 15:24, 4 years ago)
#2 2013-02-19 20:33

What aims you want to achieve with «multisites» (different visual themes with shared users DB)? 

What domains or site names will be used for different of you sites (completelly different domain names, diff. subdomains or diff subfolders of same domain)?
правильный хостинг —
#3 2013-02-20 07:22

Well, at first I wanted to have each page list as a subdomain, but I've ran into problems (see my previous post in this forums)

It will be a very simple site, using some plugins and only page, pfs, rss modules. Yes, there will be different themes. It will be a portfolio site that will cover totally different areas of interest. That's why each portfolio will be in a subdomain.

I'm pretty okay so far with what I've done, the only think is that I would like to single-log in into all instances.

#4 2013-03-13 06:37

Hello, tensh!

please, share you experience...

Did you solve problem with no single-login?

Did you try to share other db tables? What about cot_extra_fields or cot_structure?

#5 2013-03-13 09:40
#37057 tensh:

I'm pretty okay so far with what I've done, the only think is that I would like to single-log in into all instances.

If you don't use multiuser on you site (only one admin user) you can try use same $cfg['site_id'] for all subdomains. (I'm not tested it so I'm not sure it will works.)

Добавлено 28 минуты спустя:

And set «cookiedomain» to point to main domain.
правильный хостинг —

This post was edited by Macik (2013-03-13 10:08, 4 years ago)
#6 2013-03-13 10:52

Thanks, I'll try it :)