Recommended way to create multiple independent sites?

Author Message

Colin Angel

Friday 18 March 2005 3:50:03 pm

I've installed a fresh copy of eZ publish, I've
run through the wizard and chosen the 'plain'
site. The plain site works fine. Now I want
to build an additional site.

<b>Q: What is the recommended way to create
multiple, independent sites using the same ez
installation, but separate databases?</b>

ie. the following sites should have different
users, content, design and databases:

localhost/index.php/site1
localhost/index.php/site2

I've read through the documentation and the
forums, but I haven't had any luck with the
suggestions I've found. I apologize if I've
missed something.

<b>Approach #1</b> - I've tried running the wizard
again, and that seems to work, but it always
overwrites the
settings/override/site.ini.append.php - forcing me
to manually add my existing sites to SiteList and
AvailableSiteAccessList. <b>Is this the
recommended approach?</b>

<b>Approach #2</b> - I've also tried:
- Create a new database
- Load kernel_schema.sql and cleandata.sql
- Copy the plain and plain_admin folders to new
folders
- Rename them to site2 and site2_admin
- Change any references in
siteaccess\site2\site.ini.append.php and
siteaccess\site2_admin\site.ini.append.php
from 'plain' to 'site2'
- Point the Database settings to my new database
- Add site2 to SiteList and AvailableSiteAccessList
settings in the settings/override/site.ini.append.php file.
- Clear all the caches thru the admin interface.

This second approach doesn't work for me... when I
load the user page at localhost/index.php/site2 I
get "Error kernel (3)" and "Object is Unavailable"
and when I load the admin site at
localhost/index.php/site2_admin, the main page
shows "The requested page could not be displayed.
(3)" and there is no way to add any new content. I
get the same error when I click on User Accounts,
so I can't add users. Obviously I'm missing some
content, but I don't know how to populate it
without using the Wizard as described above.

Ideally I'd like a commandline approach rather
than the wizard, as I'd like to automate as much
of the process as possible.

My Details:
-----------
Installed eZ 3.5.1 from scratch
Windows 2003 (for now)
Apache 1.3.33 (not using virtual host for now)
MySQL Ver 14.7 Distrib 4.1.9
I'm using URI-based site access for now.

Thanks for any guidance... sorry if this post put
you to sleep!

Colin

Frederik Holljen

Saturday 19 March 2005 6:30:36 am

Approach 2 is correct. However, you also need to set a new CacheDir for the second "site" (both siteaccesses). The setting can be found in site.ini.

Colin Angel

Saturday 19 March 2005 9:49:16 am

Thanks for your reply Frederik. I forgot to mention that I'd set VarDir=var/site2 so my cache is being created in var/site2/cache

I'm stuck with the same errors described in my previous post for Approach #2.

Help! ;-)

Colin Angel

Saturday 19 March 2005 10:34:03 am

Solved.

I did a database comparison between a plain site installed with the wizard, and one created manually using kernel_schema.sql and cleandata.sql and the main difference is...

Locale. cleandata.sql loads content for the en-GB locale, but my siteaccess was setup for en-CA content.

In the "Manual configuration of eZ publish" document at the bottom is a section called "Translation settings in database". This section is mandatory if you use a different locale.

You MUST run these commands (using your locale) before being able to load your user or admin sites.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:23:20
Script start
Timing: Jan 18 2025 18:23:20
Module start 'layout'
Timing: Jan 18 2025 18:23:20
Module start 'content'
Timing: Jan 18 2025 18:23:21
Module end 'content'
Timing: Jan 18 2025 18:23:21
Script end

Main resources:

Total runtime1.0463 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.1641152.6563
Module start 'layout' 0.00540.0026 740.820339.5078
Module start 'content' 0.00791.0366 780.3281536.2422
Module end 'content' 1.04460.0017 1,316.570312.1094
Script end 1.0462  1,328.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3216160.0002
Check MTime0.00140.1323160.0001
Mysql Total
Database connection0.00100.094010.0010
Mysqli_queries0.984594.1007600.0164
Looping result0.00060.0605580.0000
Template Total1.018097.320.5090
Template load0.00220.206220.0011
Template processing1.015997.092720.5079
Template load and register function0.00020.017510.0002
states
state_id_array0.00080.074410.0008
state_identifier_array0.00120.115820.0006
Override
Cache load0.00200.1942760.0000
Sytem overhead
Fetch class attribute can translate value0.00090.083620.0004
Fetch class attribute name0.00130.127850.0003
XML
Image XML parsing0.00090.086620.0005
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00120.1120160.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs