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

iconv does not work properly on fpm-alpine #1299

Closed
TheTimeWalker opened this issue Nov 6, 2020 · 7 comments · Fixed by #1378
Closed

iconv does not work properly on fpm-alpine #1299

TheTimeWalker opened this issue Nov 6, 2020 · 7 comments · Fixed by #1378
Labels

Comments

@TheTimeWalker
Copy link

There currently seems to be an issue with iconv on alpine linux which means that specific plugins and other NC functionalities break if iconv is needed. This happens for example with the mail app and is noted in this issue: nextcloud/mail#3999

There seems to be apossible workaround as linked to the corresponding StackOverflow link: https://stackoverflow.com/questions/63746822/why-does-iconv-returns-empty-string-in-php7-4-fpm-alpine-docker/63747282#63747282
However I'm not sure if this is desirable to be implemented in this Dockerfile

@sfornengo
Copy link

This issue has been killing the mail application for weeks...
How to switch back from nextcloud:fpm-alpine to nexcloud:fpm ?
Only replacing nextcloud:fpm-alpine by nextcloud:fpm in docker-compose.yml doesn't work for me...
Could someone writes the steps to achieve this switch ?

@snevas
Copy link

snevas commented Dec 18, 2020

@sfornengo For me it was as simple as changing the image in the docker-compose. But please keep the sequence in mind:

  • docker-compose down
  • remove remnants you find with docker ps -a
  • change docker-compose.yml image line
  • docker-compose up

@sfornengo
Copy link

@snevas, here is the result:
image
Any idea ?

@sfornengo
Copy link

Ok, switching from fpm-alpine to fpm need also to chown /var/www to remove the error below:
docker exec nextcloud-docker_app_1 chown -R www-data:root /var/www

But even under fpm instead of fpm-alpine the mail app stucks on "loading messages"...
I thought the problem was iconv only under fpm-alpine...
Could someone help ?

@J0WI J0WI mentioned this issue Feb 1, 2021
@J0WI J0WI closed this as completed in #1378 Feb 1, 2021
@J0WI J0WI reopened this Feb 11, 2021
@almereyda
Copy link

almereyda commented Feb 19, 2021

An exemplary fix for the linuxservers image is displayed in linuxserver/docker-nextcloud#166

This is much needed for nextcloud/mail#4351

For those already building their Nextcloud image from the examples in this repository themselves, adding this to the app Dockerfile is what helped me to work around the issue:

RUN set -ex; \
  \
  apk add --no-cache \
    gnu-libiconv \
    php7-iconv \
  ;
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so

Indeed if it's mandatory for the Alpine platform, we might want to consider to include these packages in the Dockerfile by default.

As stated in #1300 (comment) by @jkellerer:

I've applied the same changes without adding edge repo and it also fixes iconv. Adding edge repo is not (or no longer) required but the env var must be set (also in FPM) and the additional packages must be installed.

Are the maintainers of this repository happy to accept a PR similar to #1300 that applies the knowingly working patch?

@J0WI
Copy link
Contributor

J0WI commented Feb 19, 2021

We use the PHP Docker image. php7-iconv pulls the PHP packages from the Alpine repo.
See docker-library/php#1121

@AlterDepp
Copy link

Fixed for me with nextcloud 20.0.8-fpm-alpine and mail app 1.9.1
Thanks

@J0WI J0WI closed this as completed Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants