OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: wbennett on August 04, 2023, 09:48:17 PM

Title: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 04, 2023, 09:48:17 PM
This is the repeating error and hoping that there is something I can do to fix this:

PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/local/lib/php/20220829/mongodb.so (Cannot open "/usr/local/lib/php/20220829/mongodb.so"), /usr/local/lib/php/20220829/mongodb.so.so (Cannot open "/usr/local/lib/php/20220829/mongodb.so.so")) in Unknown on line 0

Thanks!
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: slackadelic on August 04, 2023, 10:16:33 PM
Almost looks like you have a third party plugin installed that isn't quite updated from the release yet.  Unifi?
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: jxxaxxy on August 04, 2023, 11:19:48 PM
I believe this is the same issue in other posts in this forum.   You must have had zenarmor installed at some point.  I had to fight with it re-installing it and then removing it a couple of times to finally clear it up.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 05, 2023, 04:05:03 PM
Quote from: jxxaxxy on August 04, 2023, 11:19:48 PM
I believe this is the same issue in other posts in this forum.   You must have had zenarmor installed at some point.  I had to fight with it re-installing it and then removing it a couple of times to finally clear it up.
After uninstalling zenarmor am I supposed to still have packages installed from SunnyValley? I seem to have about 16 packages still showing as installed with the repo of SunnyValley.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 05, 2023, 04:30:46 PM
You can remove it all, then retry the upgrade.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 05, 2023, 05:22:33 PM
Quote from: newsense on August 05, 2023, 04:30:46 PM
You can remove it all, then retry the upgrade.
How would I go about removing them? I only see the option to reinstall or lock.

I already have 23.7 running.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 05, 2023, 08:45:54 PM
A screenshot would be helpul
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 05, 2023, 09:24:40 PM
Quote from: newsense on August 05, 2023, 08:45:54 PM
A screenshot would be helpul
PHP Errors:
/local/lib/php/20220829/mongodb.so.so (Cannot open "/usr/local/lib/php/20220829/mongodb.so.so")) in Unknown on line 0
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 05, 2023, 09:34:42 PM
I meant a screenshot with the remaining installed packages...

Try this command and see if it gets rid of it for you. pkg autoremove


If still having some of those packages do this pkg delete package_name


When you're done cleaning up complete the upgradeopnsense-update -u
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 06, 2023, 01:37:05 PM
Quote from: newsense on August 05, 2023, 09:34:42 PM
I meant a screenshot with the remaining installed packages...

Try this command and see if it gets rid of it for you. pkg autoremove


If still having some of those packages do this pkg delete package_name


When you're done cleaning up complete the upgradeopnsense-update -u
Update:
1 - pkg autoremove didn't make any changes

2 - pkg delete  - I was successfully able to remove all of the Sunnvalley packages.

3 - opnsense-update -u "No known packages set to fetch was specified."

The PHP warning "Unable to load dynamic library 'mongodb.so' (tried: /usr/local/lib/php/20220829/mongodb.so")

I am pretty sure that when I installed Zenarmour I chose to user the other (Elastic?) for the db. I looked for the mongodb.so at /usr/local/lib/php/20220829/ and it is definitely not there.

Any suggestions?

Thanks!







Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 06, 2023, 04:32:55 PM
Did you remove this one already ?

pkg remove php80-pecl-mongodb

If not do the opnsense-update -u after removing it.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 06, 2023, 05:59:26 PM
Quote from: newsense on August 06, 2023, 04:32:55 PM
Did you remove this one already ?

pkg remove php80-pecl-mongodb

If not do the opnsense-update -u after removing it.
Ran the command but the package was already removed.
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 06, 2023, 06:01:07 PM
What's the output when you audit health in the firmware section ?
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 06, 2023, 06:12:15 PM
Quote from: newsense on August 06, 2023, 06:01:07 PM
What's the output when you audit health in the firmware section ?
***GOT REQUEST TO AUDIT HEALTH***
Currently running OPNsense 23.7 at Sun Aug  6 13:06:02 ADT 2023
>>> Check installed kernel version
Version 23.7 is correct.
>>> Check for missing or altered kernel files
No problems detected.
>>> Check installed base version
Version 23.7 is correct.
>>> Check for missing or altered base files
No problems detected.
>>> Check installed repositories
OPNsense
>>> Check installed plugins
os-crowdsec 1.0.6
os-theme-rebellion 1.8.8
os-wireguard-go 1.13_6
>>> Check locked packages
No locks found.
>>>

Check for missing package dependencies
Checking all packages: .......... done
php81-pecl-mongodb has a missing dependency: php81
>>> Check for missing or altered package files
Checking all packages: .......... done
>>> Check for core packages consistency
Core package "opnsense" has 67 dependencies to check.
Checking packages: .................................................................... done
***DONE***
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 06, 2023, 06:18:40 PM
Remove php81-pecl-mongodb and rerun the opnsense-update -u
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: wbennett on August 06, 2023, 06:35:57 PM
Quote from: newsense on August 06, 2023, 06:18:40 PM
Remove php81-pecl-mongodb and rerun the opnsense-update -u
php81-pecl-mongodb was removed.

When I run opnsense-update -u I get the message that "No known packages set to fetch was specified".

Update: After doing the above the PHP errors have now stopped! :)

Thanks @newsense for all of your help. Much appreciated! Cheers!
Title: Re: Upgrade to 23.7 causing flood of PHP errors
Post by: newsense on August 06, 2023, 06:41:36 PM
OK, so if no more errors from audit then you're good to go, ready for 23.7.1 next week