Skip to content

Instantly share code, notes, and snippets.

@danielnunez
Forked from WillSquire/opcache_install.md
Created April 1, 2024 23:53
Show Gist options
  • Select an option

  • Save danielnunez/8682d4bafd7f7c19d77d8c3c34b74f6f to your computer and use it in GitHub Desktop.

Select an option

Save danielnunez/8682d4bafd7f7c19d77d8c3c34b74f6f to your computer and use it in GitHub Desktop.
OpCache install & configuration

Install OpCache on FreeBSD with (note 56 resembles the current PHP version 5.6):

cd /usr/ports/www/php56-opcache && sudo make config-recursive install distclean

Open up php.ini to configure OpCache settings:

sudo ee /usr/local/etc/php.ini

Check the OpCache running configuration in the command line with (note php -r 'var_dump(opcache_get_status());' can be used to check if OpCache is running, but results in CLI are unreliable):

php -r 'var_dump(opcache_get_configuration());'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment