]>
Commit | Line | Data |
---|---|---|
c8d3fdca ER |
1 | ; Enable zendopcache zend extension module |
2 | zend_extension=@extensiondir@/opcache.so | |
3 | ||
4 | ; OPcache On/Off switch. When set to Off, code is not optimized. | |
5 | ; (default "1") | |
6 | opcache.enable = 1 | |
7 | ||
8 | ; The OPcache shared memory storage size. | |
9 | ; The amount of memory for storing precompiled PHP code in Mbytes. | |
10 | ; (default "64") | |
11 | opcache.memory_consumption = 64 | |
12 | ||
13 | ; The amount of memory for interned strings in Mbytes. | |
14 | ; (default "4") | |
15 | opcache.interned_strings_buffer = 4 | |
16 | ||
17 | ; The maximum number of keys (scripts) in the OPcache hash table. | |
18 | ; The number is actually the first one in the following set of prime numbers | |
19 | ; that is bigger than the one supplied: { 223, 463, 983, 1979, 3907, 7963, | |
20 | ; 16229, 32531, 65407, 130987 }. Only numbers between 200 and 100000 are | |
21 | ; allowed. | |
22 | ; (default "2000") | |
23 | opcache.max_accelerated_files = 2000 | |
24 | ||
25 | ; The maximum percentage of "wasted" memory until a restart is scheduled. | |
26 | ; (default "5") | |
27 | opcache.max_wasted_percentage = 5 | |
28 | ||
29 | ; When this directive is enabled, the OPcache appends the current working | |
30 | ; directory to the script key, thus eliminating possible collisions between | |
31 | ; files with the same name (basename). Disabling the directive improves | |
32 | ; performance, but may break existing applications. | |
33 | ; (default "1") | |
34 | opcache.use_cwd = 1 | |
35 | ||
36 | ; When disabled, you must reset the OPcache manually or restart the webserver | |
37 | ; for changes to the filesystem to take effect. The frequency of the check is | |
38 | ; controlled by the directive "opcache.revalidate_freq". | |
39 | ; (default "1") | |
40 | opcache.validate_timestamps = 1 | |
41 | ||
94b99ab9 ER |
42 | ; Leads OPcache to check file readability on each access to cached file. |
43 | ; This directive should be enabled in shared hosting environment, when few | |
44 | ; users (PHP-FPM pools) reuse the common OPcache shared memory. | |
45 | ; (default "0") | |
46 | opcache.validate_permission = 0 | |
47 | ||
48 | ; This directive prevents file name collisions in different "chroot" | |
49 | ; environments. It should be enabled for sites that may serve requests in | |
50 | ; different "chroot" environments. | |
51 | ; (default "0") | |
52 | opcache.validate_root = 0 | |
53 | ||
c8d3fdca ER |
54 | ; How often (in seconds) to check file timestamps for changes to the shared |
55 | ; memory storage allocation. ("1" means validate once per second, but only once | |
56 | ; per request. "0" means always validate) | |
57 | ; (default "2") | |
58 | opcache.revalidate_freq = 2 | |
59 | ||
60 | ; Enables or disables file search in include_path optimization. | |
61 | ; If the file search is disabled and a cached file is found that uses the same | |
62 | ; include_path, the file is not searched again. Thus, if a file with the same | |
63 | ; name appears somewhere else in include_path, it won't be found. Enable this | |
64 | ; directive if this optimization has an effect on your applications. The | |
65 | ; default for this directive is disabled, which means that optimization is | |
66 | ; active. | |
67 | ; (default "0") | |
68 | opcache.revalidate_path = 0 | |
69 | ||
70 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the size | |
71 | ; of the optimized code. Disabling "Doc Comments" may break some existing | |
72 | ; applications and frameworks (e.g. Doctrine, ZF2, PHPUnit) | |
73 | ; (default "1") | |
74 | opcache.save_comments = 1 | |
75 | ||
c8d3fdca ER |
76 | ; Allow file existence override (file_exists, etc.) performance feature. |
77 | ; (default "0") | |
78 | opcache.enable_file_override = 0 | |
79 | ||
80 | ; A bitmask, where each bit enables or disables the appropriate OPcache passes | |
81 | ; (default "0xffffffff") | |
82 | opcache.optimization_level = 0xffffffff | |
83 | ||
94b99ab9 | 84 | ; Enable this hack as a workaround for "Cannot redeclare class" errors. |
c8d3fdca ER |
85 | ; The OPcache stores the places where DECLARE_CLASS opcodes use inheritance |
86 | ; (These are the only opcodes that can be executed by PHP, but which may not be | |
87 | ; executed because the parent class is missing due to optimization). When the | |
88 | ; file is loaded, OPcache tries to bind the inherited classes by using the | |
89 | ; current environment. The problem with this scenario is that, while the | |
90 | ; DECLARE_CLASS opcode may not be needed for the current script, if the script | |
91 | ; requires that the opcode at least be defined, it may not run. The default for | |
92 | ; this directive is disabled, which means that optimization is active. In | |
93 | ; php-5.3 and above this hack is not needed anymore and this setting has no | |
94 | ; effect. | |
95 | ; (default "1") | |
96 | opcache.inherited_hack = 1 | |
97 | ||
98 | ; The location of the OPcache blacklist file. | |
99 | ; The OPcache blacklist file is a text file that holds the names of files that | |
100 | ; should not be accelerated. The file format is to add each filename to a new | |
101 | ; line. The filename may be a full path or just a file prefix (i.e., /var/www/x | |
102 | ; blacklists all the files and directories in /var/www that start with 'x'). | |
103 | ; Files are usually triggered by one of the following three reasons: | |
104 | ; 1) Directories that contain auto generated code, like Smarty or ZFW cache. | |
105 | ; 2) Code that does not work well when accelerated, due to some delayed compile | |
106 | ; time evaluation. | |
107 | ; 3) Code that triggers an OPcache bug. | |
108 | ; (default "") | |
109 | opcache.blacklist_filename = "" | |
110 | ||
111 | ; Allows exclusion of large files from being cached. By default all files are | |
112 | ; cached. | |
113 | ; (default "0") | |
114 | opcache.max_file_size = 0 | |
115 | ||
116 | ; Check the cache checksum each N requests. | |
117 | ; The default value of "0" means that the checks are disabled. Because | |
118 | ; calculating the checksum impairs performance, this directive should be | |
119 | ; enabled only as part of a debugging process. | |
120 | ; (default "0") | |
121 | opcache.consistency_checks = 0 | |
122 | ||
123 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache | |
124 | ; is not being accessed. The OPcache uses this directive to identify a | |
125 | ; situation where there may be a problem with a process. After this time period | |
126 | ; has passed, the OPcache assumes that something has happened and starts | |
127 | ; killing the processes that still hold the locks that are preventing a | |
128 | ; restart. If the log level is 3 or above, a "killed locker" error is recorded | |
129 | ; in the Apache logs when this happens. | |
130 | ; (default "180") | |
131 | opcache.force_restart_timeout = 180 | |
132 | ||
133 | ; OPcache error_log file name. Empty string assumes "stderr". | |
134 | ; (default "" which means stderr) | |
135 | opcache.error_log = "" | |
136 | ||
137 | ; All OPcache errors go to the Web server log. | |
138 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. You | |
139 | ; can also enable warnings (level 2), info messages (level 3) or debug messages | |
140 | ; (level 4). | |
141 | ; (default "1") | |
142 | opcache.log_verbosity_level = 1 | |
143 | ||
144 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. | |
145 | ; (default "") | |
146 | opcache.preferred_memory_model = "" | |
147 | ||
148 | ; Protect the shared memory from unexpected writing during script execution. | |
149 | ; Useful for internal debugging only. | |
150 | ; (default "0") | |
151 | opcache.protect_memory = 0 | |
152 | ||
153 | ; Mapping base of shared memory segments (for Windows only). All the PHP | |
154 | ; processes have to map shared memory into the same address space. This | |
155 | ; directive allows to manually fix the "Unable to reattach to base address" | |
156 | ; errors. | |
157 | ;opcache.mmap_base = "" | |
94b99ab9 ER |
158 | |
159 | ; Absolute path used to store shared lockfiles (for *nix only) | |
160 | ; (default "/tmp") | |
161 | opcache.lockfile_path = "/tmp" |