2
votes

I'm running the default version of PHP that is packaged with Mojave. PHP 7.1.19. I've installed the PECL mongodb driver 1.5.3. To get the PECL mongodb driver install I had to disable csrutil in recover mode. When csrutil is disabled the driver works. When I re-enable csrutil the driver can no longer be loaded.

I receive this error.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 0x0009): code signature in (/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so) not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. in Unknown on line 0

From the looks of it, it seems like it's because of an unsigned package. I have no idea what I can do to resolve this issue. Does anyone have any thoughts?

1
Tip: Instead of adding the answer as an edit to your original question, consider instead submitting it as an actual answer. There is no rule against doing so, it's encouraged, it will clearly separate the question and answer, and it will be easier for other users to know that this question has received an answer. - B. Fleming
hey , nice resource. Consider answering your own question here. - YvesLeBorg
Good point. I'll answer it and remove the edit. Thanks! - Corey Welch

1 Answers

1
votes

I ended up just tossing out the default mac os version of PHP and used Homebrews PHP 7.2 version. This solved my issues. By using Homebrews version you don't need to turn off csrutil.

Good reference for help with the install.

https://getgrav.org/blog/macos-mojave-apache-multiple-php-versions