php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75670 opcache_reset problem with file_cache
Submitted: 2017-12-12 07:53 UTC Modified: 2021-07-08 13:06 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: support at lenetnet dot ru Assigned:
Status: Open Package: opcache
PHP Version: 7.1.12 OS: Debian 8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: support at lenetnet dot ru
New email:
PHP Version: OS:

 

 [2017-12-12 07:53 UTC] support at lenetnet dot ru
Description:
------------
The problem is seen in 7.1.12 and 7.2.0.
Php.ini has:
zend_extension="/opt/rh/php71/lib/php/extensions/no-debug-non-zts-20160303/opcache.so"
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache.revalidate_freq = 300
opcache.validate_timestamps=0
;opcache.file_cache= ...

If opcache.file_cache is uncommented and opcache.validate_timestamps=0 then opcache_reset() has no effect. There are to scripts: test.php and reset.php.
test.php:
<?
echo "Hi";
?>
reset.php:
<?
opcache_reset();
?>
When we change for example Hi to Hello, after that we execute reset.php and  test.php from browser. After we've done that there are no changes to issue of test.php. It shows steel Hi.

If we comment opcache.file_cache or set opcache.validate_timestamps=1 then opcache_reset works fine


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-08 13:06 UTC] cmb@php.net
If file_cache is enabled, files which are not in SHM, but in the
file cache, are read from the file cache, unless they are stale,
but that is not checked, if validate_timestamps is 0.

Not sure if that is a bug or a documentation problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC