CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11591] Phar installer doesn't work with OPCache enabled

avatar
Created By: Tristan (tristan)
Date Submitted: Tue Oct 03 04:46:39 -0400 2017

Assigned To:
Version: 2.2.3.1
CMSMS Version: 2.2.3.1
Severity: Trivial
Resolution: Works For Me
State: Closed
Summary:
Phar installer doesn't work with OPCache enabled
Detailed Description:
As described in this forum post:

https://forum.cmsmadesimple.org/viewtopic.php?f=3&t=76869&p=334131&hilit=PHP+Fatal+error%3A+Phar%3A%3AwebPhar+%3A+Failed+opening+required#p334131

You need to disable OPCache to have the Phar install working as advertised
otherwise it will just error 500 with these kind of errors in the log:

PHP Fatal error: Phar::webPhar(): Failed opening required
'phar:///var/www/vhosts/somedomain.com/cmsms-2.2.1-install.php/index.php'
(include_path='phar:///var/www/vhosts/somedomain.com/cmsms-2.2.1-install.php:.')
in /var/www/vhosts/somedomain.com/cmsms-2.2.1-install.php on line 8, referer:
https://somedomain.com/cmsms-2.2.1-install.php/index.php

if this isn't a bug but a feature, maybe we should add a note to the
documentation at Installation - Requirements to temporarily disable OPCache
before starting the Phar install?

Especially since elsewhere in the documentation at "Performance and Tuning
Information (recommended settings, but not required)"  it's suggested to make
sure there are NO values like php_flag opcache.enable Off in .htaccess and
having OPCache disables also throws a caution on the System Information page
while in the cases mentioned on the forum it's actually required to set php_flag
opcache.enable Off to make the Phar install work.


History

Comments
avatar
Date: 2017-10-04 09:28
Posted By: Robert Campbell (calguy1000)

Opcache works fine for me in the installer.  Tested many times
Either way this is not a CMSMS issue but a PHP or web-server issue.
      
avatar
Date: 2017-10-05 05:50
Posted By: Tristan (tristan)

How are you running PHP on these test instances? Over here it's mostly as
mod_php with mod_ruid2.
      
avatar
Date: 2017-10-17 09:04
Posted By: Robert Campbell (calguy1000)

This is not a CMSMS issue as in some environments the phar installer fails
before ever getting to the CMSMS code.
opcache and xcache and other plugins are known to be problematic in some 
combination of environments but I have had no difficulty with mod_php and
mod_cfgid with PHP 7
      
Updates

Updated: 2017-10-17 09:04
state: Open => Closed

Updated: 2017-10-04 09:28
resolution_id: => 11