mirror of
https://github.com/php/php-src.git
synced 2026-04-13 19:14:16 +02:00
Squashed commit of the following: commit 106c815fffb8eb3efe00a27a5229cb1f8ffc9736 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 14 16:36:44 2018 +0300 Added NEWS entry commit 1dacd5e20b7043368ef9e80db296d1781134b6fd Merge: d516139abfba99aa133cAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 14 16:33:37 2018 +0300 Merge branch 'master' into preload * master: Fixed issues related to optimization and persitence of classes linked with interfaces, traits or internal classes. Added possiblity to avoid signal handlers reinitialization on each request. commit d516139abf5ffbd495ee6037f1dc04a1cfe588a7 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 14 16:13:15 2018 +0300 Override opcache.preload for testing commit 162b154d0bbfbaf8ef93975f7e56a1353236903d Merge:45fdd034ce8bda22592eAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 14 15:38:09 2018 +0300 Merge branch 'master' into preload * master: (34 commits) Eliminate useless $this related check Eliminate useless $this related checks Replace zend_parse_method_parameters() by zend_parse_parameters() and avoid useless checks. Replace getThis() by EX(This), when additional check is not necessary. Fixed tests Validate length on socket_write Fix compilation on x32 Fix #77141: Signedness issue in SOAP when precision=-1 Support SQLite3 @name notation Remove lexer files generated by RE2C Update libmagic.patch [ci skip] Update libmagic.patch [ci skip] Fork test with pcre.jit=0 Rework magic data Fix regex Fix regex Rework magic data Sync one more upstream libmagic piece Suppress already used warning Ignore getaddrinfo failed message ... commit45fdd034ceAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Nov 9 13:07:03 2018 +0300 Properly resolve magic method of preloaded classes inherited from internal ones. commit34645aeb42Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Nov 8 15:29:17 2018 +0300 Don't preload constants defined during preload script excution. commitcef0d67c3eAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 7 15:56:54 2018 +0300 Support for class aliasses commit08ffc9a552Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Nov 7 15:34:39 2018 +0300 Resolve constants only in linked classes commit8d3429cda8Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Nov 6 11:56:39 2018 +0300 Fixed preloading of references to internal classes. commit7ae3a47d20Merge:9b0a53ed1c049f239cfcAuthor: Dmitry Stogov <dmitry@zend.com> Date: Tue Nov 6 11:37:15 2018 +0300 Merge branch 'master' into preload * master: Update NEWS [ci skip] Update NEWS [ci skip] Update libmagic.patch [ci skip] Update libmagic.patch [ci skip] Declare function proto in header Declare function proto in header Fix #76825: Undefined symbols ___cpuid_count NEWS Fix: #77110 undefined symbol zend_string_equal_val in C++ build Fix #77105: Use position:sticky for <th> in `phpinfo()` Implement handling for JIT recognition when cross compiling Backport7f5f4601for 7.2 Fix #76348: WSDL_CACHE_MEMORY causes Segmentation fault Rework places in libmagic regarding previous CVE-2014-3538 fixes Change the way JIT availability is checked Fix a test for ldap extension Fixed bug #77092 Future-proof email addresses commit9b0a53ed1cAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Nov 2 14:54:44 2018 +0300 We don't need preload_restart() here commit0bd17bd438Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Nov 2 14:44:30 2018 +0300 EG(*) may be not initializd at this point - use CG(*). commitb610467051Merge:3a9d90f74a67e0138c0dAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Nov 2 11:33:37 2018 +0300 Merge branch 'master' into preload * master: Future-proof email addresses... Update email addresses. We're still @Zend, but future proofing it... commit3a9d90f74aAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Nov 1 15:19:48 2018 +0300 Fexed resolution of method clones commitaea85c65bdAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Nov 1 11:45:50 2018 +0300 Prevent inlining of method copied from trait commit36b644fbb7Merge:7a20781d2eb91690c892Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Nov 1 10:56:02 2018 +0300 Merge branch 'master' into preload * master: Fix stray newline that caused this test to fail Fix session tests that fail if error_log is set This test needs to log to stdout Fix error condition Fixed bug #77081 ftruncate() changes seek pointer in c mode Fix and improve test case commit7a20781d2eAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 31 00:52:46 2018 +0300 Added test commit4a57b5d563Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 31 00:50:21 2018 +0300 Fixed preloading of classes linked with traits commit68c4f99e23Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 30 16:25:14 2018 +0300 Added test commit38ab7ef4cfMerge:eb6e2c529fbf38e6c10aAuthor: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 30 16:14:39 2018 +0300 Merge branch 'master' into preload * master: Keep original value of "prototype" commiteb6e2c529fMerge:562049510f2fefa8c61eAuthor: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 30 15:35:39 2018 +0300 Merge branch 'master' into preload * master: Call function_add_ref() in proper place Updated to version 2018.7 (2018g) Updated to version 2018.7 (2018g) Updated to version 2018.7 (2018g) Reslove inherited op_array references once afrer all optimizations. commit562049510fMerge:e806cb732a4828fb7b6bAuthor: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 30 10:29:49 2018 +0300 Merge branch 'master' into preload * master: [ci skip] Update NEWS [ci skip] Update NEWS [ci skip] Update NEWS fix bug #77079 Add missing null initialization Remove redundant mbfl_string_init calls Use zend_string for mbstring last encoding cache commite806cb732aAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 22:32:15 2018 +0300 Fixed double-free commit2f697ef8afAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 22:07:32 2018 +0300 typo commitc559f22b3eMerge:310631cc05ea2e67876aAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 21:59:27 2018 +0300 Merge branch 'master' into preload * master: Stop Apache if PHP wasn't started successful. Execute zend_post_startup() with module_initialized flag set. Removed dead code Fix mb_strrpos() with encoding passed as 3rd param commit310631cc05Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 16:48:42 2018 +0300 Stop Apache if PHP wasn't started successful. commit0a24d7ba8fAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 16:25:49 2018 +0300 Avoid use-after-free in main thread commit17a3cb4a2aAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 15:25:17 2018 +0300 Execute zend_post_startup() with module_initialized flag set. commit6d4b22c518Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 14:12:20 2018 +0300 Override SAPI.ub_write and SAPI.flush for preloading commit386c9d3470Merge:d7fbb4d402359f19edc9Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 29 13:49:24 2018 +0300 Merge branch 'master' into preload * master: Optimize substr() edge-case conditions [ci skip] Update UPGRADING Fix #71592: External entity processing never fails Add TIDY_TAG_* constants supported by libtidy 5 Add is_iterable to opcache Optimizer commitd7fbb4d402Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 26 13:11:54 2018 +0300 Restore preload state if it was already loaded in another process. commit0fe9ea1c07Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 26 12:29:06 2018 +0300 Removed dead code commit3a2d1bcc1fAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 26 00:19:40 2018 +0300 Support for builds without ZEND_SIGNALS commite6b76ecb4bMerge:4531fbf93168694c9997Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 23:43:25 2018 +0300 Merge branch 'master' into preload * master: Don't wrap php_module_shutdown() with zend_try. executor_globals are released in ZTS build, and this leads to crash. [ci skip] Fix indentation in UPGRADING. commit4531fbf931Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 22:44:49 2018 +0300 Disable linking and preloading of classes those parent or one of interface or trait is an internal class. commita594a618ceAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 22:30:51 2018 +0300 Cleanup - remove useless ZCSG(saved_map_ptr_last) - move preloaded classes/functions clean-up code back into better place commitab9a40f63cAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 20:52:51 2018 +0300 Added support for preloaded classes/functions in ZTS build commite3c65db099Merge:4f57c1e02933e777acbfAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 20:52:26 2018 +0300 Merge branch 'master' into preload * master: Improved shared interned strings handling. The previous implementation worked incorrectly in ZTS build. It changed strings only in function/class tables of one thread. Now all threads gets the same shared interned strings. Also, on shutdown, we don't try to replace SHM interned strings back to process strings, but delay dettachment of SHM instead. Don't use request heap at shutdown Don't optimize function if inference failed Fixed bug #77058 Improve "narrowing" error message bump versions commit4f57c1e029Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 15:29:58 2018 +0300 Cleanup (move preload_shutdown() call to better place) commit26587a95c0Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 14:30:51 2018 +0300 eol commitd70cb10480Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 14:30:20 2018 +0300 cleanup commitaabe685dbbMerge:d9fc51bc3b40808ac41eAuthor: Dmitry Stogov <dmitry@zend.com> Date: Thu Oct 25 12:42:51 2018 +0300 Merge branch 'master' into preload * master: Remove unused var Remove ext/json parser files generated by bison Fix run-tests.php for running phpdbg and certain test sections Normalize .gitignore commitd9fc51bc3bMerge:b5ffba0fafb6ef8998d5Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 24 15:59:24 2018 +0300 Merge branch 'master' into preload * master: Fixed reseting of interned strings buffer. commitb5ffba0fafMerge:e4a7ef0c43a404383118Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 24 12:46:28 2018 +0300 Merge branch 'master' into preload * master: Fixed build in directory different from source commite4a7ef0c43Merge:811f20aaa5d1e14e2cc0Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 24 11:59:43 2018 +0300 Merge branch 'master' into preload * master: (29 commits) Make php_plain_files_wrapper to be writable (workaround for swoole) Remove phpdbg parser files generated by bison Fix conflicts in phpdbg parser Refetetch function name on exceptional path to allow better code on fast code path. fix typo in sysvsem.c Fixed bug #50675 bump to 7.2.13-dev [ci skip] Update NEWS wrt. php-7.3.0RC4 tagging Inlining in the most frequently used code paths Fixed test failurs introduced by9c144e0d82Use persistent strings only for persistent connections Fix accessibility checks for dynamic properties Updated to version 2018.6 (2018f) Updated to version 2018.6 (2018f) Updated to version 2018.6 (2018f) Fix arginfo and clean up fpm_get_status Defragment two Zend related Makefile fragments together [ci skip] Remove automake and aclocal in comments Fix #75282: xmlrpc_encode_request() crashes Fix tests for ICU 63.1 ... commit811f20aaa5Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 22 14:10:49 2018 +0300 Added information about preloading to opcache_get_status() commit093e8b1bbfAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 19 13:46:23 2018 +0300 Added warning message commita2ba970ce3Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 19 13:35:40 2018 +0300 Added test commitb67e28367cAuthor: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 19 13:33:12 2018 +0300 Don't preload functions declared at run-time. commitb0139dc228Merge:a609520adb3fe698b904Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Oct 19 13:23:14 2018 +0300 Merge branch 'master' into preload * master: Mark "top-level" functions. Don't initialize static_member_tables during start-up, when inherit internal classes. [ci skip] Update NEWS [ci skip] Update NEWS [ci skip] Update NEWS Fix #77035: The phpize and ./configure create redundant .deps file Remove outdated PEAR artefacts Fix tests/output/bug74815.phpt generating errors.log Revert "Use C++ symbols, when C++11 or upper is compiled" Use C++ symbols, when C++11 or upper is compiled Added new line Remove stamp-h Move all testing docs to qa.php.net Fix a typo in UPGRADING.INTERNALS Fix test when it's run on another drive [ci skip] Update UPGRADING wrt. tidyp support Fixed incorrect reallocation Fix #77027: tidy::getOptDoc() not available on Windows Run CI tests under opcache.protect_memory=1 commita609520adbMerge:ac8f45f61bb6ac50f9e6Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 17:01:05 2018 +0300 Merge branch 'master' into preload * master: Fixed comment Micro optimizations Mark "top-level" classes commitac8f45f61bMerge:632b30b545d57cd36e47Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 15:53:41 2018 +0300 Merge branch 'master' into preload * master: Immutable clases and op_arrays. commit632b30b545Merge:d33908a99acd0c36c3f9Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 15:04:43 2018 +0300 Merge branch 'immutable' into preload * immutable: Remove the "auto" encoding Fixed bug #77025 Add vtbls for EUC-TW encoding commitcd0c36c3f9Merge:4740dabb84ad6738e886Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 14:43:38 2018 +0300 Merge branch 'master' into immutable * master: Remove the "auto" encoding Fixed bug #77025 Add vtbls for EUC-TW encoding commitd33908a99aMerge:21e0bebca34740dabb84Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 14:14:23 2018 +0300 Merge branch 'immutable' into preload * immutable: Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes. commit4740dabb84Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 14:12:28 2018 +0300 Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes. commit21e0bebca3Merge:c78277ae84ad7a78b253Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 12:29:59 2018 +0300 Merge branch 'immutable' into preload * immutable: Added comment Added type cast Moved static class members initialization into the proper place. Removed redundand assertion Removed duplicate code Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros. typo Remove unused variable makefile_am_files Classify object handlers are required/optional Add support for getting SKIP_TAGSTART and SKIP_WHITE options Remove some obsolete config_vars.mk occurrences Remove bsd_converted from .gitignore Remove configuration parser and scanners ignores Remove obsolete buildconf.stamp from .gitignore [ci skip] Add magicdata.patch exception to .gitignore Remove outdated ext/spl/examples items from .gitignore Remove unused test.inc in ext/iconv/tests commitad7a78b253Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:46:30 2018 +0300 Added comment commit0276ea5187Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:42:43 2018 +0300 Added type cast commitc63fc5d5f1Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:36:51 2018 +0300 Moved static class members initialization into the proper place. commitb945548e93Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:21:03 2018 +0300 Removed redundand assertion commitd5a4108840Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:19:13 2018 +0300 Removed duplicate code commit8dadca8864Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:05:43 2018 +0300 Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros. commit9ef07c88bdAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 10:48:29 2018 +0300 typo commita06f0f3d3aMerge:94099586ec3412345ffeAuthor: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 10:47:07 2018 +0300 Merge branch 'master' into immutable * master: Remove unused variable makefile_am_files Classify object handlers are required/optional Add support for getting SKIP_TAGSTART and SKIP_WHITE options Remove some obsolete config_vars.mk occurrences Remove bsd_converted from .gitignore Remove configuration parser and scanners ignores Remove obsolete buildconf.stamp from .gitignore [ci skip] Add magicdata.patch exception to .gitignore Remove outdated ext/spl/examples items from .gitignore Remove unused test.inc in ext/iconv/tests commitc78277ae84Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 16 17:25:35 2018 +0300 Preloadsing support for opcache restart commitf76a955c02Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Oct 16 13:52:36 2018 +0300 Fixed incorrect signal handlers overriding commit0810ce0d81Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 15 23:38:48 2018 +0300 An attempt to implemnt "preloading" ability. commit94099586ecAuthor: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 15 23:34:01 2018 +0300 Immutable clases and op_arrays
The Zend OPcache
================
The Zend OPcache provides faster PHP execution through opcode caching and
optimization. It improves PHP performance by storing precompiled script
bytecode in the shared memory. This eliminates the stages of reading code from
the disk and compiling it on future access. In addition, it applies a few
bytecode optimization patterns that make code execution faster.
Compatibility
-------------
This version of Zend OPcache is compatible with PHP 5.2.*, 5.3.*, 5.4.*
and PHP-5.5 development branch. PHP 5.2 support may be removed in the future.
Quick Install
-------------
- Compile
$PHP_DIR/bin/phpize
./configure \
--with-php-config=$PHP_DIR/bin/php-config
make
- Install
make install # this will copy opcache.so into PHP extension directory
- Edit php.ini
zend_extension=/...full path.../opcache.so
NOTE: In case you are going to use Zend OPcache together with Xdebug or Zend Debugger,
be sure that the debugger is loaded after OPcache. "php -v" must show the debugger
after OPcache.
- Restart PHP
Speed Tuning
-------------
We recommend the following configuration options for best performance
in a production environment.
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.enable_cli=1
You also may add the following, but it may break some applications and
frameworks. Please, read description of these directives and add them on your
own risk.
opcache.save_comments=0
opcache.enable_file_override=1
In some cases you may like to prefer enabling/disabling some features
to avoid incompatibilities at the cost of some performance degradation.
For development environment we would recommend setting opcache.revalidate_freq
into 0.
Configuration Directives
------------------------
opcache.enable (default "1")
OPcache On/Off switch. When set to Off, code is not optimized and cached.
opcache.enable_cli (default "0")
Enables the OPcache for the CLI version of PHP. It's mostly for testing
and debugging.
opcache.memory_consumption (default "64")
The OPcache shared memory storage size. The amount of memory for storing
precompiled PHP code in Mbytes.
opcache.interned_strings_buffer (default "4")
The amount of memory for interned strings in Mbytes.
opcache.max_accelerated_files (default "2000")
The maximum number of keys (scripts) in the OPcache hash table.
The number is actually the first one in the following set of prime
numbers that is bigger than the one supplied: { 223, 463, 983, 1979, 3907,
7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }. Only numbers
between 200 and 1000000 are allowed.
opcache.max_wasted_percentage (default "5")
When the cache fills up this setting decides when to actually reset (dump
all entries) it. At the default of 5% it means that if less than 5% of
the entries in the now full cache are wasted/orphaned, then you have a good
active cache. There is no point emptying a cache full of good entries
only to most likely refill it with those same entries. Once more than 5%
of the cache consists of wasted entries, the cache will reset in this
cache-full scenario. This can be set up to as high as 50%.
opcache.use_cwd (default "1")
When this directive is enabled, the OPcache appends the current working
directory to the script key, thus eliminating possible collisions between
files with the same name (basename). Disabling the directive improves
performance, but may break existing applications.
opcache.validate_timestamps (default "1")
When disabled, you must reset the OPcache manually or restart the
webserver for changes to the filesystem to take effect.
The frequency of the check is controlled by the directive
"opcache.revalidate_freq".
opcache.validate_permission (default "0")
Leads OPcache to check file readability on each access to cached file.
This directive should be enabled in shared hosting environment, when few
users (PHP-FPM pools) reuse the common OPcache shared memory.
opcache.validate_root (default "0")
This directive prevents file name collisions in different "chroot"
environments. It should be enabled for sites that may serve requests in
different "chroot" environments.
opcache.revalidate_freq (default "2")
How often (in seconds) to check file timestamps for changes to the shared
memory storage allocation. ("1" means validate once per second, but only
once per request. "0" means always validate)
opcache.file_update_protection (default "2")
Prevents caching files that are less than this number of seconds old.
It protects from caching of incompletely updated files. In case all file
updates on your site are atomic, you may increase performance setting it
to "0".
opcache.revalidate_path (default "0")
Enables or disables file search in include_path optimization
If the file search is disabled and a cached file is found that uses
the same include_path, the file is not searched again. Thus, if a file
with the same name appears somewhere else in include_path, it
won't be found. Enable this directive if this optimization has an effect on
your applications. The default for this directive is disabled, which means
that optimization is active.
opcache.save_comments (default "1")
If disabled, all PHPDoc comments are dropped from the code to reduce the
size of the optimized code. Disabling "Doc Comments" may break some
existing applications and frameworks (e.g. Doctrine, ZF2, PHPUnit)
opcache.enable_file_override (default "0")
Allow file existence override (file_exists, etc.) performance feature.
opcache.optimization_level (default "0xffffffff")
A bitmask, where each bit enables or disables the appropriate OPcache
passes
opcache.dups_fix (default "0")
Enable this hack as a workaround for "Cannot redeclare class" errors.
opcache.blacklist_filename
The location of the OPcache blacklist file (wildcards allowed).
Each OPcache blacklist file is a text file that holds the names of files
that should not be accelerated. The file format is to add each filename
to a new line. The filename may be a full path or just a file prefix
(i.e., /var/www/x blacklists all the files and directories in /var/www
that start with 'x'). Line starting with a ; are ignored (comments).
Files are usually triggered by one of the following three reasons:
1) Directories that contain auto generated code, like Smarty or ZFW cache.
2) Code that does not work well when accelerated, due to some delayed
compile time evaluation.
3) Code that triggers an OPcache bug.
opcache.max_file_size (default "0")
Allows exclusion of large files from being cached. By default all files
are cached.
opcache.consistency_checks (default "0")
Check the cache checksum each N requests.
The default value of "0" means that the checks are disabled.
Because calculating the checksum impairs performance, this directive should
be enabled only as part of a debugging process.
opcache.force_restart_timeout (default "180")
How long to wait (in seconds) for a scheduled restart to begin if the cache
is not being accessed.
The OPcache uses this directive to identify a situation where there may
be a problem with a process. After this time period has passed, the
OPcache assumes that something has happened and starts killing the
processes that still hold the locks that are preventing a restart.
If the log level is 3 or above, a "killed locker" error is recorded
in the Apache logs when this happens.
opcache.error_log
OPcache error_log file name. Empty string assumes "stderr".
opcache.log_verbosity_level (default "1")
All OPcache errors go to the Web server log.
By default, only fatal errors (level 0) or errors (level 1) are logged.
You can also enable warnings (level 2), info messages (level 3) or
debug messages (level 4).
opcache.preferred_memory_model
Preferred Shared Memory back-end. Leave empty and let the system decide.
opcache.protect_memory (default "0")
Protect the shared memory from unexpected writing during script execution.
Useful for internal debugging only.
opcache.restrict_api (default "")
Allows calling OPcache API functions only from PHP scripts which path is
started from specified string. The default "" means no restriction.
opcache.mmap_base
Mapping base of shared memory segments (for Windows only). All the PHP
processes have to map shared memory into the same address space. This
directive allows to manually fix the "Unable to reattach to base address"
errors.
opcache.lockfile_path (default "/tmp")
Absolute path used to store shared lockfiles (for *nix only)