ibexa

Path

ez publish / technical manual / 3.7 / installation / manual installation / manual configuration of ez...


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Manual configuration of eZ publish

This section describes how to manually configure eZ publish instead of using the setup wizard to do all the work. Please keep in mind that the manual installation method is for expert users only. It should only be used by people who know what they are doing. The following steps will work on both Linux/UNIX and Windows environments.

Database initialization

A clean eZ publish database is created using two very important SQL scripts: "kernel_schema" and "cleandata". While the "kernel_schema" script differs for each database engine, the "cleandata" script is the same for all solutions.

MySQL

Use the following command to run the MySQL specific "kernel_schema" script:

$ mysql -u <username> -p<password> <database> < /path/to/ez_publish/kernel/sql/mysql/kernel_schema.sql

Note that the CREATE TABLE statements in the "kernel_schema" script do not specify which storage engine to use (no ENGINE or TYPE option), and thus the default storage engine will be used. Normally, it is MyISAM. If you are running MySQL 4.x or later, it is recommended to use the InnoDB engine instead (if it is available on your server). To do this, set the default storage engine to InnoDB before you run the "kernel_schema" script (refer to the MySQL documentation for information about how to set the default engine).

When installing an eZ Publish version downloaded from a subversion repository, "TYPE=MyISAM" is explicitly specified in "kernel_schema.sql". To make the script use the InnoDB storage engine, replace all occurrences of "TYPE=MyISAM" with "TYPE=InnoDB" before you run the script. In addition, set the default storage engine to InnoDB, otherwise future upgrades might leave you with a mix of table types.

Alternatively, you can run the "kernel_schema" script first and then convert the newly created tables to InnoDB. You can either use the "bin/php/ezconvertmysqltabletype.php" script for database conversion (recommended) or convert the tables individually by using the following SQL query for each table:

ALTER TABLE <name_of_table> TYPE = innodb;

 

Use the following command to run the generic "cleandata" script:

$ mysql -u <username> -p<password> <database> < /path/to/ez_publish/kernel/sql/common/cleandata.sql

 

username

The MySQL user (if no user is set up, use "root").

password

The password that belongs to the username.

database

The name of the database, for example "my_database".

File permissions

Windows users can skip this part. If eZ publish is installed on a Linux/UNIX based system, some of the file permissions need to be changed. There exists a shell script that takes care of this. This script must be run, or else, eZ publish will not function properly. The script needs to be run from within the eZ publish directory:

$ cd /path/to/ez_publish
$ bin/modfix.sh

 

The modfix script recursively alters the permission settings of the following directories:

  • var/*
  • settings/*
  • design/*

If you know the user and group of the webserver it is recommended to use a different set of permissions:

$ chmod og+rwx -R var
$ chown -R example.example var

The "example.example" notation must be changed to user and groupname of the webserver.

Configuring eZ publish

The "/path/to/ez_publish/settings/override/site.ini.append.php" configuration file must be changed, or else eZ publish will not function properly. There are a lot of things that need to be configured (database, mail transport system, var directory, etc.). The following text shows a generic example of a configuration that can be used:

<?php /* #?ini charset="iso-8859-1"?
 
[DatabaseSettings]
DatabaseImplementation=ezmysql
Server=localhost
User=root
Password=
Database=example
 
[FileSettings]
VarDir=var/example
 
[Session]
SessionNameHandler=custom
 
[SiteSettings]
DefaultAccess=example
SiteList[]
SiteList[]=example
 
[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=example
AvailableSiteAccessList[]=example_admin
MatchOrder=host;uri
 
# Host matching
HostMatchMapItems[]=www.example.com;example
HostMatchMapItems[]=admin.example.com;example_admin
 
[InformationCollectionSettings]
EmailReceiver=webmaster@example.com
 
[MailSettings]
Transport=sendmail
AdminEmail=webmaster@example.com
EmailSender=test@example.com
 
[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
TextTranslation=disabled
 
*/ ?>

In addition, two siteaccess configurations must be created, a public siteaccess and an administration siteaccess. In the example above "example" and "example_admin" is used. The following directories have to be created:

  • /path/to/ez_publish/settings/siteaccess/example
  • /path/to/ez_publish/settings/siteaccess/example_admin

Both siteaccesses must have a file called "site.ini.append.php".

The public siteaccess

The following text shows a generic solution for the "example" siteaccess:

<?php /* #?ini charset="iso-8859-1"?
 
[SiteSettings]
SiteName=Example
SiteURL=www.example.com
LoginPage=embedded
 
[SiteAccessSettings]
RequireUserLogin=false
ShowHiddenNodes=false
 
[DesignSettings]
SiteDesign=example
 
[ContentSettings]
ViewCaching=disabled
 
[TemplateSettings]
TemplateCache=disabled
TemplateCompile=disabled
#ShowXHTMLCode=enabled
#Debug=enabled
 
[DebugSettings]
DebugOutput=enabled
Debug=inline
#DebugRedirection=enabled
 
*/ ?>

The admin siteaccess

The following text shows a generic solution for the "example_admin" siteaccess:

<?php /* #?ini charset="iso-8859-1"?
 
[SiteSettings]
SiteName=Example
SiteURL=admin.example.com
LoginPage=custom
 
[SiteAccessSettings]
RequireUserLogin=true
ShowHiddenNodes=true
 
[DesignSettings]
SiteDesign=admin
 
[ContentSettings]
CachedViewPreferences[full]=admin_navigation_content=0;admin_navigation_details=0;admin_navigation_languages=0;admin_navigation_locations=
0;admin_navigation_relations=0;admin_navigation_roles=0;admin_navigation_policies=0;admin_navigation_content=0;admin_navigation_translatio
ns=0;admin_children_viewmode=list;admin_list_limit=1;admin_edit_show_locations=0;admin_url_list_limit=10;admin_url_view_limit=10;admin_sec
tion_list_limit=1;admin_orderlist_sortfield=user_name;admin_orderlist_sortorder=desc;admin_search_stats_limit=1;admin_treemenu=1;admin_boo
kmarkmenu=1;admin_left_menu_width=13
 
[DebugSettings]
DebugOutput=disabled
Debug=inline
 
*/ ?>

Unicode support

If you're using a database which supports Unicode (for example MySQL 4.1.x or later) and PHP is compiled with multibyte string support, create the following file: "/path/to/ez_publish/settings/override/i18n.ini.append.php" and make sure that it contains these lines:

<?php /* #?ini charset="iso-8859-1"?
 
[CharacterSettings]
Charset=utf-8
MBStringExtension=enabled
 
*/ ?>

Primary language

The default primary language (used by the "cleandata" SQL script) is British English (eng-GB). If you're planning to set up a site where the primary language should be something else than British English, you'll have to change this by running a couple of SQL commands. The following examples shows how to switch the primary to Norwegian Bokmål (nor-NO).

Content object names

UPDATE ezcontentobject_name
SET
  content_translation='nor-NO',
  real_translation='nor-NO'
WHERE
  content_translation='eng-GB' OR
  real_translation='eng-GB';

Content object attributes

UPDATE ezcontentobject_attribute
SET
  language_code='nor-NO'
WHERE
  language_code='eng-GB';

Balazs Halasy (03/05/2005 8:28 am)

Svitlana Shatokhina (20/08/2008 8:21 am)

Balazs Halasy, Svitlana Shatokhina, Julia Shymova


Comments

  • query

    UPDATE ezcontentobject_name
    SET
    content_translation='eng-US',
    real_translation='eng-US'
    WHERE
    content_translation='eng-GB' AND
    real_translation='eng-GB';

    This query is only working for me... The other threw a duplicate key error in my db ( compare AND vs OR )
  • database connectivity

    In which file do we have to change the database name, user name and password when we download the folders and files of any site from their server (using ezpublish? And want to run on our local machine.I need the whole path.
  • Cleandata admin password

    The standard admin password for the cleandata file is publish.
  • Multilingual Configuration in 3.8

    If you use this configuration method in eZ publish 3.8, you will face some problems with your language settings.
    There are specific settings you can see in this page : http://pubsvn.ez.no/nextgen/trunk...ures/3.8/multi-language_features.txt

    But in addition to these settings, you need to update the database before the queries mentionned above
    UPDATE ezcontentobject_name
    SET
      content_translation='fre-FR',
      real_translation='fre-FR'
    WHERE
      content_translation='eng-GB' OR
      real_translation='eng-GB';
    

    and
    UPDATE ezcontentobject_attribute
    SET
      language_code='fre-FR'
    WHERE
      language_code='eng-GB';
    

    my primary language is french (fre-FR) and I want to have english and spanish also

    The sql table ezcontent_language must be feeded with these languages in the order I want.
    To do so, I run these queries
    DELETE FROM `ezcontent_language` WHERE 1;
    INSERT INTO `ezcontent_language` VALUES (0,2,'fre-FR','Français (France)'),(0,4,'eng-GB','English (United Kingdom)'),(0,8,'esl-ES','Castillan (Spain)');
    

    and after that the 2 queries mentionned above

    I hope this will help and I hope that the 3.8 documentation come soon
  • Different charset in siteaccess not possible

    Please be aware that you can not have an overriding charset defined in a siteaccess' i18n.ini.append.php.

    According to the developers this is a feature: http://ez.no/community/bugs/stran...e_i18n_ini_didn_t_try_with_other_ini

    So, you can only have one global charset for your eZ installation. This took me a while to find out..