Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Don't activate OPCache on Dreamhost !?

Started by Muut Archive 10 years ago · 6 replies · 721 views
10 years ago

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

10 years ago

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

10 years ago

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

10 years ago

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?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1356 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago