You are not logged in.
All,
As I work to get a new install of Nextcloud 27.0.2 on php-legacy ironed out, one log message that keeps repeating is "Module \"bcmath\" is already loaded at Unknown#0". The nextcloud help list just suggested uninstalling and reinstalling the php-bcmath module (Ubuntu has a separate package), but that makes no sense for Arch, php-legacy has no separate package. The install per the wiki has bcmath loaded in the following locations:
# grep -R bcmath /etc/webapps/nextcloud/*
/etc/webapps/nextcloud/php.ini:extension=bcmath
/etc/webapps/nextcloud/php.ini:[bcmath]
/etc/webapps/nextcloud/php.ini:; Number of decimal digits for all bcmath functions.
/etc/webapps/nextcloud/php.ini:; https://php.net/bcmath.scale
/etc/webapps/nextcloud/php.ini:bcmath.scale = 0
and
# grep -R bcmath /etc/php-legacy/*
/etc/php-legacy/php-fpm.d/nextcloud.conf:php_value[extension] = bcmath
/etc/php-legacy/php-fpm.ini:extension=bcmath
/etc/php-legacy/php-fpm.ini:[bcmath]
/etc/php-legacy/php-fpm.ini:; Number of decimal digits for all bcmath functions.
/etc/php-legacy/php-fpm.ini:; https://php.net/bcmath.scale
/etc/php-legacy/php-fpm.ini:bcmath.scale = 0
/etc/php-legacy/php.ini:extension=bcmath
/etc/php-legacy/php.ini:[bcmath]
/etc/php-legacy/php.ini:; Number of decimal digits for all bcmath functions.
/etc/php-legacy/php.ini:; https://php.net/bcmath.scale
/etc/php-legacy/php.ini:bcmath.scale = 0
That is exactly what the wiki has you do in making the copies of php.ini and setting up FPM. The error it triggers is:
{"reqId":"mH1konEWsRgMQtuvwio8","level":3,"time":"2023-09-07T10:03:49+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"PROPFIND","url":"/nextcloud/remote.php/dav/calendars/david/","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"lgffQIN6PeE3Fe2OWmQR","level":3,"time":"2023-09-07T10:04:00+00:00","remoteAddr":"XX.XX.XX.XX","user":"--","app":"PHP","method":"GET","url":"/nextcloud/js/core/merged-template-prepend.js?v=b8353225-5","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"3X8QaTqByrjxh15cZxn7","level":3,"time":"2023-09-07T19:06:01+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"PROPFIND","url":"/nextcloud/remote.php/dav/calendars/david/","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
The log message is informational, but I would like to figure out how get rid of the spurious log messages. Why is this message triggered? How can I fix it?
Last edited by drankinatty (2023-09-08 02:03:37)
David C. Rankin, J.D.,P.E.
Offline
I have the same question.
Offline
For me, the same warning applied to redis extension.
/etc/webapps/nextcloud/php.ini
is not relevant, as it's run by nextcloud maintenance, only.
Meanwhile,
/etc/php-legacy/conf.d
includes files enabling needed extensions. If they are removed, nextcloud will not run.
However,
/etc/php-legacy/{php.ini,php-fpm.ini}
also contain entries that enable extensions. After commenting out extension=redis, the warning was gone for me.
But lately, the warning reappeared for igbinary and sodium. Those are enabled in
/etc/php-legacy/conf.d
only, but not in php.ini nor php-fpm.ini. I am confused.
Edit: Setting
/etc/php-legacy/{php.ini,php-fpm.ini}
error_reporting = E_ERROR & ~E_DEPRECATED & ~E_STRICT
and
/etc/php-legacy/php-fpm.conf
log_level = error
to remove the warnings.
Last edited by anarki@buttereblume (2024-04-03 15:03:08)
Offline