php 5.5 and OPcache - CMSimple Update recommended

CMSimple 4.0 und höher
Post Reply
Gert
Posts: 2082
Joined: Sun 18. Nov 2012, 14:18

php 5.5 and OPcache - CMSimple Update recommended

Post by Gert »

Image Hallo,

php 5.5 wird mit per default aktiviertem OPcache ausgeliefert. Das ist ein Modul, das php Dateien für einen definierten Zeitraum zwischenspeichert.

Da CMSimple von Anfang an Daten in php Dateien speichert, ist OPcache Gift für CMSimple, da sich Änderungen im Backend erst nach Ablauf der Gültigkeitsdauer der OPcache Dateien auswirken. Das stiftet Verwirrung und birgt auch noch andere Gefahren. OPcache lässt sich Gott sei Dank per ini_set deaktivieren.

cms.php ganz oben, dierekt nach dem Kommentarblock:

Code: Select all

ini_set('opcache.enable', 0);
 
// CMSimpleSubsites: prepare CMSIMPLE_ROOT (vor dieser Zeile einfügen)        
Diese Codezeile deaktiviert OPcache komplett, alles funktioniert wie vorher.

Ich habe alle Downloads von CMSimple 4.2.4 incl. Update aktualisiert:

http://www.cmsimple.org/?Downloads

Wer bereits CMSimple 4.2.4 nutzt, sollte das Update update_cmsimple40_424.zip trotzdem noch einmal herunterladen und ausführen (im Prinzip reicht der Austausch der cms.php), oder die Erweiterung an der cms.php selbst vornehmen. Wer eine ältere Version benutzt, sollte jetzt updaten. Eine neue Version folgt demnächst.

Ich werde nun beobachten, wie die Provider mit OPcache umgehen werden, und eventuell später ein "intelligentes OPcache Management" einführen,

Gert

=======================================================

Image Hello,

php 5.5 is shipped with OPcache enabled by default. This is a module, which temporarily stores php files for a defined time.

Since the beginning, CMSimple stores data in php files, so OPcache is poison for CMSimple, because the impact of changes in the backend not take effect before the end of the lifetime of the OPcache files. This causes confusion and brings other dangers. OPcache thankfully can be disabled via ini_set.

cms.php, below the comment block on top:

Code: Select all

ini_set('opcache.enable', 0);
 
// CMSimpleSubsites: prepare CMSIMPLE_ROOT (insert above this line)         
This line of code disables OPcache completely, everything works as before.

I have updated all downloads of CMSimple 4.2.4 incl Update:

http://www.cmsimple.org/en/?Downloads

Who already uses CMSimple 4.2.4, should download the update_cmsimple40_424.zip again and update the installation (replacing of the cms.php suffices), or edit the cms.php by himself. Who uses an older version, should update now. A new version will be coming next time.

I will observe now, how the providers will deal with OPcache, and perhaps I will introduce an "intelligent OPcache management" later,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Post Reply