Bug #75891 [NEW]: Enabled Opcache causes different errors
From: p dot pfleiderer at gmx dot de
Operating system: Windows Server 2012 R2
PHP version: 7.1.13
Package: opcache
Bug Type: Bug
Bug description:Enabled Opcache causes different errors
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 bug report at https://bugs.php.net/bug.php?id=75891&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75891&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75891&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75891&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75891&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75891&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75891&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75891&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75891&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75891&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75891&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75891&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75891&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75891&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75891&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75891&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75891&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75891&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75891&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75891&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75891&r=mysqlcfg
Thread (3 messages)
- p dot pfleiderer at gmx dot de