Why isn't my apache2 server recognizing my changes to my opcache PHP settings?

188 Views Asked by At
  • Hello, thanks for dropping by. I would like to know why my opcache settings are being ignored.
  • I'm running Apache2 2.4 on a recent flavor of debian linux on a remote server
  • I wish to increase my opcache.interned_strings_buffer value to be 32, higher than 16, the default.
  • <?php phpinfo(); ?> on my server reports that Apache is running PHP 8.1.11, loading its configuration files from "/etc/php/8.1/fpm/php.ini" and "/etc/php/8.1/fpm/conf.d/10-opcache.ini".
  • I therefore set opcache.interned_strings_buffer=32 in both of these init files using vi and saved them.
  • I then finally restarted the server using sudo service apache2 restart.
  • Disappointingly, for some reason, the value reported by phpinfo() for opcache.interned_strings_buffer is still 16 after this "change".

Can someone here tell me what I might be doing wrong? Thanks!

1

There are 1 best solutions below

0
Rich On

It turns out that after modifying the config files, rebooting fixed the issue. I found this puzzing but strangely familiar.
After consulting earlier notes, I believe it's because I did not restart the "fpm server", which is probably required:

systemctl restart php8.1-fpm