Bug #71292 [Opn->Fbk]: Opcache settings have no effect, only default settings are loaded

From: Date: Wed, 06 Jan 2016 18:23:57 +0000
Subject: Bug #71292 [Opn->Fbk]: Opcache settings have no effect, only default settings are loaded
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198452@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71292&edit=1 ID: 71292 Updated by: ab@php.net Reported by: dev at models dot com Summary: Opcache settings have no effect, only default settings are loaded -Status: Open +Status: Feedback Type: Bug Package: opcache Operating System: Windows Server 2008 R2 / IIS PHP Version: 7.0.1 Block user comment: N Private report: N New Comment: Thanks for the report. Yes, it is the know issue that sometimes reattaching to SHM fails. In 7.0 the INI directive opcache.file_cache_fallback was added, to still make use of the file cache in this situation. In your configuration, opcache.file_cache= has no value, thus the fallback cannot work. Please set a valid path as a value and observe the happenings. Thanks. Previous Comments: ------------------------------------------------------------------------ [2016-01-05 22:01:36] dev at models dot com Adding more info, we are also seeing these errors in the Windows Application log: Source: Zend OPcache Event ID: 487 Base address marks unusable memory region Attempt to access invalid address. Which seems to be the same issue or related to the one described here: https://github.com/zendtech/ZendOptimizerPlus/issues/167 and in this php bug report: https://bugs.php.net/bug.php?id=64926 ------------------------------------------------------------------------ [2016-01-05 20:22:10] dev at models dot com 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 this bug report at https://bugs.php.net/bug.php?id=71292&edit=1

« previous php.bugs (#198452) next »