Crash report: PHP unable to load dynamic library mongodb.so

Started by dunxd, October 30, 2026, 10:30:12 PM

Previous topic - Next topic
After updating to 26.7.8 from 26.7.7 today, I get a crash report every second with these errors:
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/local/lib/php/20250925/mongodb.so (Cannot open "/usr/local/lib/php/20250925/mongodb.so"), /usr/local/lib/php/20250925/mongodb.so.so (Cannot open "/usr/local/lib/php/20250925/mongodb.so.so")) in Unknown on line 0OPNsense seems to be working fine otherwise.

I saw #msg270385

It mentions php83-pecl-mongodb and that some people had that left over from a previous install of zenarmor. I had zenarmor till a few months ago. I suspect this was left over from then, and I didn't notice the crash error as the messages indicator isn't visible on the web interface on a small mobile phone screen which I use most of the time.

Anyway, I went ahead and deleted the package and restarted the webgui and the message is now gone.

In my case mongodb.so was a leftover from an older ZenArmor install. ZenArmor itself is still installed but no longer uses MongoDB: as of v2.5 (September 2025) MongoDB and Elasticsearch 5 were dropped as reporting backends, so the current reporting runs on SQLite or Elasticsearch 8.

Removing the package had no effect on filtering.

I removed it anyway rather than keep an unused extension around: it carries its own update and CVE surface, and an extension nobody needs is just extra code loaded into every PHP process.

best
Hardware: N5105 Intel Celeron  
                       OPNsense | Home Lab | Linux & Home Automation
                               "Secure the network, automate the rest."

Quote from: (MARLOO) on October 31, 2026, 01:35:23 AMIn my case mongodb.so was a leftover from an older ZenArmor install. ZenArmor itself is still installed but no longer uses MongoDB: as of v2.5 (September 2025) MongoDB and Elasticsearch 5 were dropped as reporting backends, so the current reporting runs on SQLite or Elasticsearch 8.
It's documented here : https://www.zenarmor.com/docs/guides/best-practices-for-zenarmor-deployment#reporting-database
For those who might read this topic in the future :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Glad it wasnt community repo :)
Building still fails...
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Quote from: nero355 on October 31, 2026, 10:05:47 PMIt's documented here : https://www.zenarmor.com/docs/guides/best-practices-for-zenarmor-deployment#reporting-database

Thanks Nero355 this is exacltly the link

Also Remote Elasticsearch must be between 8.9.x and 8.17.1, so not "any 8.x".

The leftover mongodb.so is normal. Older ZenArmor versions installed MongoDB automatically on firewalls with 2–4 GB of RAM max.


Quote from: mimugmail on October 31, 2026, 10:57:33 PMBuilding still fails...

Is the report new or old?

Try this order

Reboot once and check whether the report timestamp stops

If it keeps coming

----------------------------
pkg info | grep -i mongo
-------------------------------

Then find the leftover line

-----------------------------------------------------------------------------
grep -rn mongodb /usr/local/etc/php.ini /usr/local/etc/php/extensions.ini
-----------------------------------------------------------------------------

Remove it and reload PHP
-----------------------------------------------------------------------------
sed -i '' '/mongodb\.so/d' /usr/local/etc/php.ini /usr/local/etc/php/extensions.ini

configctl webgui restart
-------------------------------------------------------------------------------------

 do you have a second backend or a legacy plugin installed — old Sensei, or a community plugin that still pulls php85-pecl-mongodb as a dependency?
Hardware: N5105 Intel Celeron  
                       OPNsense | Home Lab | Linux & Home Automation
                               "Secure the network, automate the rest."