Don't activate OPCache on Dreamhost !?

I have a fresh GRAV install on a DreamHost webspace, just to dig into GRAV. I’m a mac native, but I am fairly safe with command line in general. Nevertheless I do also use an SFTP client for convenience. And (blame me) I even edit files remotely since I am learning, not working on a site in production mode.

So, I have OPCache activated (noted in the docs that it isn’t activated by default) and Composer installed (and working) on Dreamhost. Whenever I install GRAV using Composer, then install the admin panel by using GPM and create a user by the new “bin/plugin login newuser” command, I have a working GRAV install up and running in seconds.

But I run into sort of the same critical error every time I start customising my installation – and I can’t reproduce it. Just appears at some point in time. The effect is that I see a critical error that refers to “/vendor/rockettheme/toolbox/file/src/file.php” line 254. It went on to the point that even a fresh install using composer brought up the critical error, indicating GRAV couldn’t load from cache.

Next I noticed that dur ing composer installation the dependencies had a remark saying “Loading from cache”. Eventually my trace moved towards the caching and I tried to disable OPCache temporarily. I came across a website ( https://ma.ttias.be/how-to-clear-php-opcache/ ) that indicated having OPCache running in a CGI or FastCGI model would actually hurt performance so I disabled the module. By default Dreamhost runs PHP 5.6 as FastCGI.

Guess what? Tada. All is fine now. So my question is: Am I missing something or should the installation notes be changed towards NOT activating OPCache on Dreamhost, or generally not if your host runs PHP as CGI/FastCGI?

Thanks for this incredible piece of software. Keep up the good work!

Lars

Looks like Grav cannot read from the cache, might just be a permission issue? Did you check learn.getgrav.org/troubleshooting/permissions?

P.S. I’m running Grav on Dreamhost too without issues.

with opcache activated?

I thought about permissions, too. But there is nothing suspicious, at least I don’t see it

Yes with opcache enabled, running 5.6 fastcgi. I wrote this: http://learn.getgrav.org/hosting/shared/dreamhost not sure what could be different.

Strange. Since I’ve deactivated OPCache the issue didn’t show up. So I assume it must be related. Can anyone confirm OPCache doesn’t help performance on hosts running PHP as FastCGI?