Skip to content

Instantly share code, notes, and snippets.

@jaymecd
Last active January 29, 2017 09:50
Show Gist options
  • Save jaymecd/23c7c0d05d9576cdb14ffe1a0c5b5f99 to your computer and use it in GitHub Desktop.
Save jaymecd/23c7c0d05d9576cdb14ffe1a0c5b5f99 to your computer and use it in GitHub Desktop.
PHP-7: Misssing Extensions

PHP-7: Misssing Extensions

NB! all actions are done on alpine:3.4 within php:7.0.7.

NB! After installation, do not forget to update php.ini with extension={NAME}.so records.

Install build dependencies:

$ apk update
$ apk add --no-cache autoconf file g++ gcc libc-dev make pkgconf re2c

imagick

Install ext-imagick from mkoppanen/imagick:

$ apk add imagemagick-dev
$ curl -sSL -A "Docker" -D - -o /tmp/ext-imagick.tgz https://github.com/mkoppanen/imagick/archive/phpseven.tar.gz \
    && tar zxpf /tmp/ext-imagick.tgz -C /tmp \
    && cd /tmp/imagick-phpseven \
    && phpize && ./configure \
    && make && make install 

NB! Has segmentation fault with exit code 139, while php -i and php --ri imagick

igbinary

Install ext-igbinary from igbinary/igbinary7:

$ curl -sSL -D - -o /tmp/ext-igbinary.tgz https://github.com/igbinary/igbinary7/archive/master.tar.gz \
    && tar zxpf /tmp/ext-igbinary.tgz -C /tmp \
    && cd /tmp/igbinary7-master \
    && phpize && ./configure \
    && make && make install

memcached

Install ext-memcached from php-memcached-dev/php-memcached:

$ apk add libmemcached-dev
$ curl -sSL -A "Docker" -D - -o /tmp/ext-memcached.tgz https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz \
    && tar zxpf /tmp/ext-memcached.tgz -C /tmp \
    && cd /tmp/php-memcached-php7 \
    && phpize && ./configure --disable-memcached-sasl --enable-memcached-igbinary --enable-memcached-json \
    && make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment