1 ; Enable zendopcache zend extension module
2 zend_extension=@extensiondir@/opcache.so
4 ; OPcache On/Off switch. When set to Off, code is not optimized.
8 ; The OPcache shared memory storage size.
9 ; The amount of memory for storing precompiled PHP code in Mbytes.
11 opcache.memory_consumption = 64
13 ; The amount of memory for interned strings in Mbytes.
15 opcache.interned_strings_buffer = 4
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
23 opcache.max_accelerated_files = 2000
25 ; The maximum percentage of "wasted" memory until a restart is scheduled.
27 opcache.max_wasted_percentage = 5
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.
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".
40 opcache.validate_timestamps = 1
42 ; How often (in seconds) to check file timestamps for changes to the shared
43 ; memory storage allocation. ("1" means validate once per second, but only once
44 ; per request. "0" means always validate)
46 opcache.revalidate_freq = 2
48 ; Enables or disables file search in include_path optimization.
49 ; If the file search is disabled and a cached file is found that uses the same
50 ; include_path, the file is not searched again. Thus, if a file with the same
51 ; name appears somewhere else in include_path, it won't be found. Enable this
52 ; directive if this optimization has an effect on your applications. The
53 ; default for this directive is disabled, which means that optimization is
56 opcache.revalidate_path = 0
58 ; If disabled, all PHPDoc comments are dropped from the code to reduce the size
59 ; of the optimized code. Disabling "Doc Comments" may break some existing
60 ; applications and frameworks (e.g. Doctrine, ZF2, PHPUnit)
62 opcache.save_comments = 1
64 ; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" may
65 ; be always stored (save_comments=1), but not loaded by applications that don't
68 opcache.load_comments = 1
70 ; If enabled, a fast shutdown sequence is used for the accelerated code. The
71 ; fast shutdown sequence doesn't free each allocated block, but lets the Zend
72 ; Engine Memory Manager do the work.
74 opcache.fast_shutdown = 0
76 ; Allow file existence override (file_exists, etc.) performance feature.
78 opcache.enable_file_override = 0
80 ; A bitmask, where each bit enables or disables the appropriate OPcache passes
81 ; (default "0xffffffff")
82 opcache.optimization_level = 0xffffffff
84 ; Enable this hack as a workaround for "can't redeclare class" errors.
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
96 opcache.inherited_hack = 1
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
107 ; 3) Code that triggers an OPcache bug.
109 opcache.blacklist_filename = ""
111 ; Allows exclusion of large files from being cached. By default all files are
114 opcache.max_file_size = 0
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.
121 opcache.consistency_checks = 0
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.
131 opcache.force_restart_timeout = 180
133 ; OPcache error_log file name. Empty string assumes "stderr".
134 ; (default "" which means stderr)
135 opcache.error_log = ""
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
142 opcache.log_verbosity_level = 1
144 ; Preferred Shared Memory back-end. Leave empty and let the system decide.
146 opcache.preferred_memory_model = ""
148 ; Protect the shared memory from unexpected writing during script execution.
149 ; Useful for internal debugging only.
151 opcache.protect_memory = 0
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"
157 ;opcache.mmap_base = ""