forked from ezsystems/ezpublish-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php-RECOMMENDED
115 lines (97 loc) · 4.45 KB
/
config.php-RECOMMENDED
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/*
WHAT THIS FILE IS ABOUT - READ CAREFULLY
----------------------------------------
This file contains a documented list of the few configuration points
available from config.php. The proposed default values below are meant
to be the most optimized ones, or meaningful examples of what can be achieved.
In order to have the present settings taken into account, you will need to
rename this file into config.php, and keep it placed at the root of eZ Publish,
where config.php-RECOMMENDED is currently placed. Plus, you will need to
*uncomment* the proposed settings.
*/
/*
PATH TO THE EZCOMPONENTS
------------------------
config.php can set the components path like:
*/
//ini_set( 'include_path', ini_get( 'include_path' ). PATH_SEPARATOR . '../ezcomponents/trunk' );
/*
USING BUNDLED COMPONENTS
------------------------
If you are using a distribution of eZ Publish with which the necessary
eZ Components are bundled (in lib/ezc), then you can use this setting to
control if the bundled eZ Components should be used (true) or not (false).
By default, when this setting is not present and the bundled eZ Components are
present, they will be used. If you're using the bundled eZ Components it's recommended
to define EZP_USE_BUNDLED_COMPONENTS as a boolean true anyway, for optimal speed.
*/
//define( 'EZP_USE_BUNDLED_COMPONENTS', true );
/*
If you are not using the bundled eZ Components, then for optimal speed it is
recommended to set EZC_BASE_PATH to either ezc/Base/base.php or Base/src/base.php,
depending on how you installed the eZ Components. By default, if this setting
is not present, eZ Publish first tries to include ezc/Base/base.php in the standard
php include path. If that fails Base/src/base.php is included.
*/
//define( 'EZC_BASE_PATH', '/usr/lib/ezc/Base/base.php' );
/*
TIMEZONES
---------
The recommended way of setting timezones is via php.ini.
However you can set the default timezone for your eZ Publish application as shown below.
More on supported timezones : http://www.php.net/manual/en/timezones.php
*/
//date_default_timezone_set( 'Europe/Paris' );
/*
INI FILES OPTIMIZATIONS
-----------------------
This new setting controls whether eZINI should check if the settings have
been updated in the *.ini-files*. If this check is disabled eZ Publish
will always used the cached values, lowering the amount of stat-calls to
the file system, and thus increasing performance.
Set EZP_INI_FILEMTIME_CHECK constant to false to improve performance by
not checking modified time on ini files. You can also set it to a string, the name
of a ini file you still want to check modified time on, best example would be to
set it to 'site.ini' to make the system still check that but not the rest.
*/
//define( 'EZP_INI_FILEMTIME_CHECK', false );
/*
KERNEL OVERRIDES
----------------
This setting controls if eZ Publish's autoload system should allow, and
load classes, which override kernel classes from extensions.
NB1: Not all classes can be overridden because of existing includes for eg handlers.
NB2: This feature is not covered by support and any kind of kernel overrides
needs to be explicitly informed to eZ Systems on support requests.
*/
//define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', false );
/*
Set EZP_INI_FILE_PERMISSION constant to the permissions you want saved
ini and cache files to have. This setting also applies to generated autoload files.
Do keep an octal number as value here ( meaning it starts by a 0 ).
*/
//define( 'EZP_INI_FILE_PERMISSION', 0666 );
/*
CUSTOM AUTOLOAD MECHANISM
-------------------------
It is also possible to push a custom autoload method to the autoload
function stack. Remember to check for class prefixes in such a method, if it
will not serve classes from eZ Publish and eZ Components.
Here is an example code snippet to be placed right in this file, in the case
you would be using your custom Foo framework, in which all PHP classes would be
prefixed by 'Foo' :
<code>
ini_set( 'include_path', ini_get( 'include_path' ). ':/usr/lib/FooFramework/' );
require 'Foo/ClassLoader.php';
function fooAutoload( $className )
{
if ( 'Foo' == substr( $className, 0, 3 ) )
{
FooClassLoader::loadClass( $className );
}
}
spl_autoload_register( 'fooAutoload' );
</code>
*/
?>