Bug #66569 [Fbk->NoF]: Opcache interoperation with Phar fails tests

From: Date: Sun, 19 Sep 2021 04:22:08 +0000
Subject: Bug #66569 [Fbk->NoF]: Opcache interoperation with Phar fails tests
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236682@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66569&edit=1

 ID:               66569
 Updated by:       php-bugs@lists.php.net
 Reported by:      Terry at ellisons dot org dot uk
 Summary:          Opcache interoperation with Phar fails tests
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          opcache
 Operating System: N/A
 PHP Version:      master-Git-2014-01-24 (snap)
 Assigned To:      cmb
 Private report:   N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2021-09-09 13:42:01] cmb@php.net

Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2018-03-20 12:51:30] leonie at netcreators dot nl

This bug is still open since 2014 and might make things fail in today's PHP 7 real life:

https://github.com/xperseguers/t3ext-extractor/issues/5

Is there any update from the official side?

------------------------------------------------------------------------
[2014-01-24 15:02:45] Terry at ellisons dot org dot uk

Description:
------------
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

  create_new_and_modify.phpt
  delete_in_phar.phpt
  delete_in_phar_confirm.phpt
  tar/create_new_and_modify.phpt
  tar/delete_in_phar.phpt
  tar/delete_in_phar_confirm.phpt
  zip/create_new_and_modify.phpt
  zip/delete_in_phar.phpt
  zip/delete_in_phar_confirm.phpt

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 

  phar://<file_root>.phar.php

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

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

  phar://<file_root>.phar.php/a.php

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.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=66569&edit=1


Thread (4 messages)

« previous php.bugs (#236682) next »