storj-thirdparty / nextcloud-app

GNU Affero General Public License v3.0
22 stars 3 forks source link

php-fpm: cant install app - ffi not enabled #16

Closed philipp1992 closed 2 years ago

philipp1992 commented 2 years ago

hello, running nextcloud on kubernetes with php-fpm. Ive installed the ffi via apt accordingly and added the lines to the php.ini, but when i try to install the app, it fails with

image

root@nextcloud-67d5576bdc-8pvx7:/usr/local/etc/php/conf.d# php-fpm -i  |grep -i "ffi"
/usr/local/etc/php/conf.d/docker-php-ext-ffi.ini,
FFI
FFI support => enabled
ffi.enable => On => On
ffi.preload => no value => no value
FFI => Dmitry Stogov
root@nextcloud-67d5576bdc-8pvx7:/usr/local/etc/php/conf.d# php-fpm  -v
PHP 8.0.14 (fpm-fcgi) (built: Dec 18 2021 02:27:49)
Copyright (c) The PHP Group
Zend Engine v4.0.14, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.14, Copyright (c), by Zend Technologies

Would really appreciate if someone can point me to the right directory on how to fix this. kind regards Philipp

Erikvv commented 2 years ago

Your console output looks fine to me.

Did you install+enable ffi in the docker image, and not just in the running container? It only works when everything is set up before FPM has started.

If that doesn't fix it:

philipp1992 commented 2 years ago

Hi Erik The error message appears right after kicking download and enable on the nextcloud ui and it won't install at all.

I've added the apt install commands to the kubernetes poststart lifecycle hook so I didn't modify the dockerfile directly.

Von meinem iPhone gesendet

Am 31.01.2022 um 03:08 schrieb Erik van Velzen @.***>:

 Your console output looks fine to me.

Did you install+enable ffi in the docker image, and not just in the running container? It only works when everything is set up before FPM has started.

If that doesn't fix it:

insert a call to phpinfo() in the website to check that output on the website also shows that FFI is fine. post (part of) your Dockerfile — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

Erikvv commented 2 years ago

I find on https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/

there is no guarantee that the hook will execute before the container ENTRYPOINT.

Starting fpm takes like 0.2 seconds but updating+installing via apt takes like 4 seconds. So it seems that is your problem.

A solution for your problem is to reload fpm by sending the USR2 signal after installing libffi:

sudo kill -USR2 <pid>

But I'd recommend installing it in the image.

Erikvv commented 2 years ago

Closing the issue for now unless new actionable information comes up.