簡體   English   中英

Zend OPcache 問題(Windows Server 2012 + IIS + Plesk + PHP 7)

[英]Zend OPcache Issue (Windows Server 2012 + IIS + Plesk + PHP 7)

我剛剛升級到 PHP 7 並發現它又好又快,但是自從我升級(代碼完全沒有變化)以來,我一直收到間歇性的內部服務器錯誤 (500)。 我正在記錄錯誤,但正常日志中沒有任何內容,但在事件查看器中,我有數千個:

The description for Event ID 487 from source Zend OPcache cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

Base address marks unusable memory region. Please setup opcache.file_cache and opcache.file_cache_callback directives for more convenient Opcache usage
Attempt to access invalid address.

我假設我配置錯誤,或者更新中出現了一些問題。 任何幫助都會非常棒,非常感謝。

我需要添加/更改我的 php.ini 以包含以下內容。 我在一個關於“Moodle”的網站上找到了它……不管是什么。

我希望它對那里的一些人有用!

opcache.enable=1
zend_extension="C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP70\ext\php_opcache.dll"

opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0
opcache.revalidate_path = 1 ; May fix problems with include paths
opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487

還有https://bugs.php.net/bug.php?id=72645

這可以通過禁用其他版本的 PHP(5.4、5.5、5.6)的 opcache 或為每個 IIS 站點切換專用池來解決。

我已經使用opcache.enable_cli = 0修復OroCRM 軟件的相同問題

opcache.file_cache="C:\Windows\temp\php_opcache"
opcache.file_cache_fallback=1

用於參考和設置 opcache: https ://www.php.net/manual/en/opcache.installation.php

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM