|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66569 Opcache interoperation with Phar fails tests
Submitted: 2014-01-24 15:02 UTC Modified: 2021-09-19 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: Terry at ellisons dot org dot uk Assigned: cmb (profile)
Status: No Feedback Package: opcache
PHP Version: master-Git-2014-01-24 (snap) OS: N/A
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-01-24 15:02 UTC] Terry at ellisons dot org dot uk
The following list of Phar tests pass when run with -d opcache.enable=0 but fail when run with -d opcache.enable=1 -d opcache.enable_cli=1


The issue seems to be a common mode one. For example in create_new_and_modify.phpt, the script ini_sets opcache.revalidate_freq=0 if OPcache is enabled. It then creates a Phar container 


where file_root is __FILE__ less the .phpt extension, and adds an element a.php containing "brand new!".  It then includes

and replaces the element a.php with new contents "modified!" and reincludes


The test expects the result "modified!" which is what happens if OPcache is disabled.  However when enabled, this returns the previously cached "brand new!".  This is probably an OPcache bug rather than a Phar one since the revalidate frequency is set to "always revalidate".

I'll put this on my TODO list to track down, but it's low priority. I just wanted to log the issue though since these test do fail run-test.php for the PHP-5.6 release if OPcache is enabled.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-20 12:51 UTC] leonie at netcreators dot nl
This bug is still open since 2014 and might make things fail in today's PHP 7 real life:

Is there any update from the official side?
 [2021-09-09 13:42 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-09 13:42 UTC]
Is this still an issue with any of the actively supported PHP

[1] <>
 [2021-09-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Oct 07 00:05:53 2022 UTC