Skip to content

Commit

Permalink
Merge pull request #60 from devilbox/release-0.46
Browse files Browse the repository at this point in the history
Fix Redis for PHP 7.4
  • Loading branch information
cytopia authored Nov 3, 2018
2 parents ab4f0e0 + dfe0f8c commit 4569855
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
17 changes: 17 additions & 0 deletions Dockerfiles/mods/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,21 @@ RUN set -x \
&& (rm -rf /usr/local/lib/php/test/recode || true) \
&& (rm -rf /usr/local/lib/php/doc/recode || true) \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \
&& git clone -v https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
&& phpize \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \
&& ./configure \
&& make -j8 \
&& make install \
\
&& docker-php-ext-enable redis \
\
&& (rm -rf /usr/local/lib/php/test/redis || true) \
&& (rm -rf /usr/local/lib/php/doc/redis || true) \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \
&& pecl install rdkafka \
&& docker-php-ext-enable rdkafka \
\
Expand Down Expand Up @@ -589,6 +604,8 @@ RUN set -x \
&& php-fpm -m | grep -oiE '^readline$' \
&& php -m | grep -oiE '^recode$' \
&& php-fpm -m | grep -oiE '^recode$' \
&& php -m | grep -oiE '^redis$' \
&& php-fpm -m | grep -oiE '^redis$' \
&& php -m | grep -oiE '^rdkafka$' \
&& php-fpm -m | grep -oiE '^rdkafka$' \
&& php -m | grep -oiE '^session$' \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>7.4</th>
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
</tbody>
</table>
Expand Down
13 changes: 12 additions & 1 deletion build/ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1258,10 +1258,21 @@ extensions_available:
build_dep: [librecode-dev]
run_dep: [librecode0]
redis:
disabled: [7.4]
5.2:
type: pecl
version: 2.2.7
7.4:
type: git
git_url: https://github.com/phpredis/phpredis
# This is a nasty work-around to fix current phpredis implementation for PHP 7.4
command: |
phpize \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \
&& ./configure \
&& make -j8 \
&& make install \
all:
type: pecl
rdkafka:
Expand Down

0 comments on commit 4569855

Please sign in to comment.