Zend_extension=opcache.so


#1

So I’ve been getting a ton of intermittent Server Error 500’s in my shared host sites. It turns out that DH is inserting the following into our PHP config files:

; {{{ The following lines were automatically added by DreamHost
zend_extension=opcache.so
; }}} That’s all from DreamHost

The problem is that if we already have that line in there, the extra line causes “random” faults that show to visitors and in the error logs. I put the line in my configs, hoping DH will read the config first before adding their own line. Or… I might have just removed DH’s comments. Before I did that, DH was just duplicating their additions like this, resulting in the same problem.

; {{{ The following lines were automatically added by DreamHost
zend_extension=opcache.so
; }}} That’s all from DreamHost
; {{{ The following lines were automatically added by DreamHost
zend_extension=opcache.so
; }}} That’s all from DreamHost

Specifics:

/home/youruser/.php/7.1 << and 7.2 and 7.3
Edit file “phprc”, there’s no extension. If you have a duplicate of the zend_extension assignment, remove one of them and the related comments. If there is only one, you’re fine.

It looks like for 7.3 there’s no duplication. I don’t know. DH creates a phprc.old file, but that just overwrites their last .old file, so I don’t know when they originally modified it or what was there before.

So: Dear DreamHost:

  • How about emailing me with a suggested change, or that you made a change?
  • How about checking to see if the line is already there before adding it again?
  • How about getting someone who is competent to write your scripts, and check their work?

Have a smurfy day!


#2

Out of curiosity, what PHP error are logged for these intermittent 500s? I.e. what errors show up in error.log?