Forums / Install & configuration / Recommended way to create multiple independent sites?

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.

eZ debug

Timing: Jan 18 2025 20:54:27
Script start
Timing: Jan 18 2025 20:54:27
Module start 'content'
Timing: Jan 18 2025 20:54:28
Module end 'content'
Timing: Jan 18 2025 20:54:28
Script end

Main resources:

Total runtime0.9993 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 587.9609180.8047
Module start 'content' 0.00760.8320 768.7656541.3516
Module end 'content' 0.83960.1597 1,310.1172336.7500
Script end 0.9993  1,646.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.4567210.0002
Check MTime0.00160.1573210.0001
Mysql Total
Database connection0.00090.089110.0009
Mysqli_queries0.895889.63751970.0045
Looping result0.00230.23321950.0000
Template Total0.955395.620.4776
Template load0.00220.223920.0011
Template processing0.953095.366420.4765
Template load and register function0.00030.027810.0003
states
state_id_array0.00090.094610.0009
state_identifier_array0.00100.095220.0005
Override
Cache load0.00200.1987760.0000
Sytem overhead
Fetch class attribute can translate value0.00140.141130.0005
Fetch class attribute name0.00110.109250.0002
XML
Image XML parsing0.00280.281530.0009
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.01931.9362270.0007
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs