Our apps are set up with Laravel and MongoDB, but we're getting a lot of errors relating to Core Warning: Module 'mongodb' already loaded
being logged in Sentry.io
.
Here are the results from grep -rnw '/etc/php/' -e 'mongodb.so'
/etc/php/7.2/cli/php.ini:1928:extension=mongodb.so
/etc/php/7.2/mods-available/mongodb.ini:1:extension=mongodb.so
/etc/php/7.2/fpm/php.ini:1928:extension=mongodb.so
/etc/php/7.1/mods-available/mongodb.ini:1:extension=mongodb.so
/etc/php/7.3/mods-available/mongodb.ini:1:extension=mongodb.so
/etc/php/7.0/mods-available/mongodb.ini:1:extension=mongodb.so
/etc/php/5.6/mods-available/mongodb.ini:1:extension=mongodb.so
And here are the results from a generic php --ini
(notice the error doesn't appear here.)
PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 8 2019 15:38:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Do I need to remove one of the ini
files above? If so, which one? I'd previously removed duplicate lines of extension=mongodb.so
from cli/php.ini
and from fpm/php.ini
, but the error continues to show up in our Sentry.io
event logs.
If php is being run as a web server module, you need to restart the web server itself after you modify php.ini. The configuration will not be loaded automatically if you don't do that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.