Bug #75891 [Opn->Fbk]: Enabled Opcache causes different errors

From: Date: Sun, 18 Oct 2020 21:47:51 +0000
Subject: Bug #75891 [Opn->Fbk]: Enabled Opcache causes different errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229725@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75891&edit=1

 ID:                 75891
 Updated by:         cmb@php.net
 Reported by:        p dot pfleiderer at gmx dot de
 Summary:            Enabled Opcache causes different errors
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            opcache
 Operating System:   Windows Server 2012 R2
 PHP Version:        7.1.13
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Does that still happen with any of the actively supported PHP
versions[1]?

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


Previous Comments:
------------------------------------------------------------------------
[2018-01-31 08:12:18] 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


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



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


Thread (3 messages)

« previous php.bugs (#229725) next »