storj-thirdparty / nextcloud-app

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

[PHP] Error: Module 'FFI' already loaded at Unknown#0 #22

Closed nunesgh closed 2 years ago

nunesgh commented 2 years ago

Hi there,

I have just installed the app and enabled the PHP FFI extension as instructed, but now my Nextcloud instance logs are being flooded with the following error: [PHP] Error: Module 'FFI' already loaded at Unknown#0

It seems to me that other apps also load the PHP FFI extension by themselves, which then causes the error.

My Nextcloud instance information:

Thank you for your attention.

Erikvv commented 2 years ago

This means you have extension=ffi twice in your config.

Maybe it is once in [/usr/local]/etc/php/php.ini and then again in a file in [/usr/local]/etc/php/conf.d/

nunesgh commented 2 years ago

You are correct!

If I add ffi.enable=true to /etc/php/php.ini but leave the already existing extension=ffi line commented-out, the PHP error no longer appears.

Thank you for help!