php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75891 Enabled Opcache causes different errors
Submitted: 2018-01-31 08:12 UTC Modified: 2020-11-01 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: p dot pfleiderer at gmx dot de Assigned: cmb (profile)
Status: No Feedback Package: opcache
PHP Version: 7.1.13 OS: Windows Server 2012 R2
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:
42 + 36 = ?
Subscribe to this entry?

 
 [2018-01-31 08:12 UTC] p dot pfleiderer at gmx dot de
Description:
------------
It seems that the combination of PHP 5.6 - 7.1.x, Windows Server 2012 R2 and the IIS 8.5 causes different Errors when opcache is enabled. We migrated our PHP configuration and scripts 1:1 from Windows Server 2008 and there was no Problem. But With Server 2012 we randomly get the error "Cannot redeclare class" error. The scripts work fine for 4-5 times, then the redeclare class error appeares. We tried to set the Option opcache.dups_fix = true, but without success. The only workaround was to wrap all classes with 
 if(!class_exists("Database_Zend",false)) {... } but then suddenly preg_match errors appeared.

Some error examples:

[07-Dec-2017 09:57:11 Europe/Berlin] PHP Fatal error: Cannot redeclare composerRequiree744d24db906654e872801355481e07f() (previously declared in D:\inetpub\wwwroot\itdoc\extensions\BlueSpiceFound ation\vendor\composer\autoload_real.php:63) in D:\Inetpub\wwwroot\itdoc\extensions\BlueSpiceFound ation\vendor\composer\autoload_real.php on line 63

 [11-Dec-2017 09:35:23 Europe/Berlin] PHP Warning: preg_match_all(): Compilation failed: two named subpatterns have the same name at offset 1312




Test script:
---------------
class Logfile {
 private $filename;

 public function __construct($file) {
  $this->filename = "D:/logs/".$file;
 }
}

Expected result:
----------------
No redeclare error

Actual result:
--------------
redeclare error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-18 21:47 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-18 21:47 UTC] cmb@php.net
Does that still happen with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-11-01 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-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 06:03:37 2021 UTC