Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

eztc.php

Summary

Compiles the eZ Publish caches.

Location

./bin/php/eztc.php

Parameters

access-path
allow-root-user
colors
compile-directory
debug
force
full-url
help
index-file
logfiles
no-colors
no-full-url
no-logfiles
quiet
siteaccess
verbose
www-dir

--access-path=VALUE

Extra access path.

-r,--allow-root-user

Allows your root user to run the ezcache.php script. The usage of this parameter is only recommended for advanced users. With great power comes great responsibility.

-c, --colors

Use ANSI colors when generating debug output (default).

--compile-directory=VALUE

Path where to place compiled files, default is template/compiled in current cache directory.

-d[<option>[,<option2>...]], --debug[=<option>[,<option2>...]]

Output debug information. The following options can be used to control what the debug output should include: "all" (everything), "accumulator" (accumulators), "include" (included files), "timing" (timing points), "error" (errors), "warning" (warnings), "notice" (notices).

--force

Force compilation of template whether it has changed or not.

--full-url

Makes sure generated urls have http:// in them (i.e. global), used mainly by sites that include the eZ Publish HTML (e.g payment gateways).

-h, --help

Output information about the script and supported parameters.

--index-file=VALUE

The name of your index.php if you are running in non-virtualhost mode.

--logfiles

Generate log files. This parameter must be used together with the debug parameter ("-d" or "--debug"). The log files (for example "warning.log") will be stored in the "var/log" directory of the eZ Publish installation.

--no-colors

Do not use ANSI colors when generating debug output.

--no-full-url

Makes sure generated urls are relative to the site. (default)

--no-logfiles

Do not generate log files (default).

-q, --quiet

Run the script in "quiet" mode. No output will be generated.

-s <siteaccess>, --siteaccess=<siteaccess>

The siteaccess to run the script for. If omitted, the default siteaccess will be used.

-v, --verbose

Output verbose / additional information.

--www-dir=VALUE

The part before the index.php in your URL, you should supply this if you are running in non-virtualhost mode.

Description

This script compiles the eZ Publish templates, generating template caches for all views of a given siteaccess.
If no siteaccess is specified (using the -s, --siteaccess parameter) the default one will be used.

To run the script, navigate into the root directory of your eZ Publish installation and use the following shell command:

php bin/php/eztc.php [<parameters>]

Replace "[<parameters>]" with one or more of the script parameters described above. Note that you need to have PHP CLI installed in order to run the script from within a system shell.

Sometimes the script is unable to compile the templates (generate template cache) because of restrictive file/directory permission settings. You can check whether the templates have been compiled by inspecting the contents of the various cache sub-directories within the "var" directory (typically "var/cache/" and "var/<name_of_siteaccess>/cache/template/compiled" directories).

Template compile on clustered environments

The script also works for compiling templates on multiple node installations, and for that the script must be executed on each server node, which will generate local template cache for each one.
The both usage applies both for clustered and non-clustered environments. 

Examples

Example 1

php bin/php/eztc.php -s ezflow_site

Compile templates for the "ezflow_site" siteaccess.

Example 2

php bin/php/eztc.php -s ezflow_site --force

Force the template compile for the "ezflow_site" siteaccess.

Ricardo Correia (25/02/2013 12:12 pm)

Ricardo Correia (25/02/2013 3:13 pm)


Comments

There are no comments.