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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 + 20 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 16:01:27 2024 UTC