From: dev at models dot com
Operating system: Windows Server 2008 R2 / IIS
PHP version: 7.0.1
Package: opcache
Bug Type: Bug
Bug description:Opcache settings have no effect, only default settings are loaded
Description:
------------
Changing any of the opcache. settings after having enabled the extension
in php.ini has no effect on any of the settings.
The only thing that seems to work is loading or unloading the opcache
extension adding or removing the zend_extension="full path to opcache
dll" option.
Opcache is enabled and loaded, verified via phpinfo() which reports that
the opcache module is loaded and enabled.
This is on Windows Server 2008 R2, running php 7.0.1 x64 nts in fastcgi
mode.
Making the same changes on php 5.5.29 on the same server works properly,
opcache settings can be changed via php.ini and new settings are
reported by phpinfo().
Test script:
---------------
The info reported by phpinfo() is as follows:
Opcode Caching Up and Running
Optimization Enabled
SHM Cache Enabled
File Cache Disabled
Startup OK
Shared memory model win32
Cache hits 0
Cache misses 1
Used memory 9132712
Free memory 57976152
Wasted memory 0
Interned Strings Used memory 132024
Interned Strings Free memory 4062280
Cached scripts 1
Cached keys 2
Max keys 3907
OOM restarts 0
Hash keys restarts 0
Manual restarts 0
Directive Local Value Master Value
opcache.blacklist_filename no value no value
opcache.consistency_checks 0 0
opcache.dups_fix Off Off
opcache.enable On On
opcache.enable_cli Off Off
opcache.enable_file_override Off Off
opcache.error_log no value no value
opcache.fast_shutdown 0 0
opcache.file_cache no value no value
opcache.file_cache_consistency_checks 1 1
opcache.file_cache_fallback 1 1
opcache.file_cache_only 0 0
opcache.file_update_protection 2 2
opcache.force_restart_timeout 180 180
opcache.inherited_hack On On
opcache.interned_strings_buffer 4 4
opcache.log_verbosity_level 1 1
opcache.max_accelerated_files 2000 2000
opcache.max_file_size 0 0
opcache.max_wasted_percentage 5 5
opcache.memory_consumption 64 64
opcache.mmap_base no value no value
opcache.optimization_level 0xFFFFFFFF 0xFFFFFFFF
opcache.preferred_memory_model no value no value
opcache.protect_memory 0 0
opcache.restrict_api no value no value
opcache.revalidate_freq 2 2
opcache.revalidate_path Off Off
opcache.save_comments 1 1
opcache.use_cwd On On
opcache.validate_timestamps On On
Changing any of the corresponding settings in php.ini and restarting
iis/recycling the app pool has no effect, the settings remain the same.
This is the [opcache] settings section of our php.ini file.
I have verified the correct php.ini is loaded, other custom settings are
applied and reported by phpinfo()
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=8000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=30
opcache.fast_shutdown=1
Expected result:
----------------
Expecting php.ini changes to opcache. settings to be reported by
phpinfo()
Actual result:
--------------
phpinfo() always reports the default values for opcache configruation
options.
--
Edit bug report at https://bugs.php.net/bug.php?id=71292&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71292&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71292&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71292&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71292&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71292&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71292&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71292&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71292&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71292&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71292&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71292&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71292&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71292&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71292&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71292&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71292&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71292&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71292&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71292&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71292&r=mysqlcfg