Closed misaon closed 6 years ago
Fixed with this "hack":
#####################################################################
######################## FIX iconv extension #######################$
#####################################################################
ENV BUILD_PACKAGES="wget build-base php7-dev autoconf re2c libtool"
RUN apk --no-cache --progress add $BUILD_PACKAGES \
# Install GNU libiconv
&& mkdir -p /opt \
&& cd /opt \
&& wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz \
&& tar xzf libiconv-1.15.tar.gz \
&& cd libiconv-1.15 \
&& sed -i 's/_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");/#if HAVE_RAW_DECL_GETS\n_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");\n#endif/g' srclib/stdio.in.h \
&& ./configure --prefix=/usr/local \
&& make \
&& make install \
# Install PHP iconv from source
&& cd /opt \
&& wget http://php.net/distributions/php-7.1.5.tar.gz \
&& tar xzf php-7.1.5.tar.gz \
&& cd php-7.1.5/ext/iconv \
&& phpize \
&& ./configure --with-iconv=/usr/local \
&& make \
&& make install \
&& mkdir -p /etc/php7/conf.d \
&& echo "extension=iconv.so" >> /etc/php7/conf.d/iconv.ini \
# Cleanup
&& apk del $BUILD_PACKAGES \
&& rm -rf /opt \
&& rm -rf /var/cache/apk/* \
&& rm -rf /usr/share/*
#####################################################################
#####################################################################
#####################################################################
@misaon new builds were published today, please check if the problem persists.
@hernandev Thanks for reply but i rewrite my all my Docker image. I cant check if problem persist.
Problem persist. I found fix in other repository https://github.com/richarvey/nginx-php-fpm/blob/master/Dockerfile#L15
I'll check this, thanks for reporting.
On the latest releases, I cannot reproduce this problem.
Also, images were updated to php-7.2.4 and php-7.1.16, maybe this alone fixes the issue.
Waiting on confirmation.
If the problem persists, please re-open the issue, or start a new one, and I'll check. Thank you all!
Hi i have problem with install ICONV php extension on alpine 3.7.
My Dockerfile:
When i run phpinfo i see this message:
The same problem: https://github.com/docker-library/php/issues/240
Any ideas? Thanks a lot!