Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable opcache for php 5.5.0+ #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joec4i
Copy link

@joec4i joec4i commented Jun 22, 2022

opcache is bundled with PHP 5.5.0 and later, so --enable-opcache should work with all versions >= 5.5.0.

I'm not entirely sure if we need the version check, since all currently supported php versions have opcache included. But I included the version check in the PR anyway, because I'm not 100% sure if anyone uses asdf-php to install very old versions of PHP.

This was tested locally.

$ php -i | grep opcache
Configure Command => './configure' '--with-gmp=/usr/local/opt/gmp' '--with-sodium=/usr/local/opt/libsodium' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gettext=/usr/local/opt/gettext' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-webp-dir=/usr/local/opt/webp' '--with-png-dir=/usr/local/opt/libpng' '--with-openssl=/usr/local/opt/openssl@1.1' '--with-libxml-dir=/usr/local/opt/libxml2' '--with-libzip=/usr/local/opt/libzip' '--with-readline=/usr/local/opt/readline' '--with-iconv=/usr/local/opt/libiconv' '--prefix=/Users/joe.cai/.asdf/installs/php/8.0.20' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-fpm' '--enable-ftp' '--enable-gd' '--enable-gd-native-ttf' '--enable-intl' '--enable-mbregex' '--enable-mbstring' '--enable-mysqlnd' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--sysconfdir=/Users/joe.cai/.asdf/installs/php/8.0.20' '--with-config-file-path=/Users/joe.cai/.asdf/installs/php/8.0.20' '--with-config-file-scan-dir=/Users/joe.cai/.asdf/installs/php/8.0.20/conf.d' '--with-curl' '--with-external-gd' '--with-fpm-group=www-data' '--with-fpm-user=www-data' '--with-gd' '--with-mhash' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-xmlrpc' '--with-zip' '--with-zlib' '--without-snmp' '--enable-opcache' '--with-pear' '--with-pdo-pgsql' 'PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:'

$ php -v
PHP 8.0.20 (cli) (built: Jun 22 2022 20:33:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Please review. Thanks!

@joec4i joec4i requested a review from a team as a code owner June 22, 2022 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant