SchumacherFM / Magento-OpCache

OpCache (Zend Optimizer) Control Panel (GUI) for the Magento Backend.
100 stars 36 forks source link

"Compile all PHP files" ignores blacklist settings #14

Closed durzel closed 7 years ago

durzel commented 8 years ago

When I click "Compile all PHP files" the process dies before completing due to attempting to compile files that are not compatible with PHP7.x. These directories have been excluded using the OpCache blacklist functionality, and show up as blacklisted in the OpCache Panel in Magento.

[Wed May 04 10:54:01.817813 2016] [:error] [pid 52718] [client 1.2.3.4:50195] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /home/magento/public_html/lib/Varien/Pear/Registry .php on line 49, referer: https://www.magentosite.com/index.php/ogadm/opCachePanel/index/key/ccb169680aad0e96fda36b419d721d3a/

/home/magento/public_html/lib is blacklisted.

it seems as if the "Compile all PHP files" disregards the contents of blacklist files?

SchumacherFM commented 8 years ago

Thank you for your bug report!

Yes the script does not consider the value of the blacklist: https://github.com/SchumacherFM/Magento-OpCache/blob/master/src%2Fapp%2Fcode%2Fcommunity%2FSchumacherFM%2FOpCachePanel%2FModel%2FCache.php#L58

If you would like to send me a pull request to fix this problem I'm happy to merge it :-)