I need help with including mongodb extension for php in apache on MacOs.
I installed php8.3.1, apache Apache/2.4.56 (Unix) and included mongodb extension in php (extension=”/usr/local/lib/php/pecl/20230831/mongodb.so”). Also included phpmodule in apache “LoadModule php_module /usr/local/Cellar/php/8.3.1/lib/httpd/modules/libphp.so”.
And when I check php modules in terminal I see mongodb there:
olegk@olg buddy-web % php -v
PHP 8.3.1 (cli) (built: Dec 20 2023 12:44:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.1, Copyright (c) Zend Technologies
with Zend OPcache v8.3.1, Copyright (c), by Zend Technologies
olegk@olg buddy-web % php --ini
Configuration File (php.ini) Path: /usr/local/etc/php/8.3
Loaded Configuration File: /usr/local/etc/php/8.3/php.ini
Scan for additional .ini files in: /usr/local/etc/php/8.3/conf.d
Additional .ini files parsed: /usr/local/etc/php/8.3/conf.d/ext-opcache.ini
olegk@olg buddy-web % php -m
[PHP Modules]
....
mongodb
....
But when I checked phpinfo() I don’t see mongodb module there
screenshot of phpinfo
I tried already all possible things and it still not load mogodb in apache. Maybe you know where issue can be?