PHP driver extension installation problems

Hello. I am running into some significant challenges during the extension’s installation process.

I am following alongside the article series ( for PHP drier setup. I was able to install all prerequisite packages (PHP, Apache) through Homebrew and was able to successfully install the Mongodb Driver extension through pecl. I also added the “” line to both php.ini files.

However, when I subsequently run the command “php -i | grep mongodb”, I receive an output of:
mongodb.debug => no value => no value

I have read through both Mongodb’s documentation and PHP’s documentation but have not yet been able to locate a solution.

I am operating on macOS Monterey (12.2.1). When I tried to uninstall the Mongodb driver with pecl to retry the process, I received a “permission denied” error and the uninstall failed. Not sure if this is related to the issue at hand.

Well, you may have to go sudo to delete the driver.
Also, did you reboot after you modified php.ini? Not a bad idea.

Thanks Jack.

For others’ benefit, the issue was caused by missing prerequisite packages libbson and libmongoc, which I had to install separately and subsequently rerun the process.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.