简体   繁体   English

OS X Mojave 问题上的 MongoDB PHP 驱动程序

[英]MongoDB PHP Driver on OS X Mojave Issues

I'm running the default version of PHP that is packaged with Mojave.我正在运行与 Mojave 一起打包的默认 PHP 版本。 PHP 7.1.19. PHP 7.1.19。 I've installed the PECL mongodb driver 1.5.3.我已经安装了 PECL mongodb 驱动程序 1.5.3。 To get the PECL mongodb driver install I had to disable csrutil in recover mode.要安装 PECL mongodb 驱动程序,我必须在恢复模式下禁用 csrutil。 When csrutil is disabled the driver works.当 csrutil 被禁用时,驱动程序工作。 When I re-enable csrutil the driver can no longer be loaded.当我重新启用 csrutil 时,无法再加载驱动程序。

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? PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/lib/php/extensions/no-debug -non-zts-20160303/mongodb.so, 0x0009): (/usr/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so) 中的代码签名不适用于进程:映射文件没有 cdhash,完全未签名? Code has to be at least ad-hoc signed.代码必须至少经过临时签名。 in Unknown on line 0在未知的第 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?有人有想法吗?

I ended up just tossing out the default mac os version of PHP and used Homebrews PHP 7.2 version.我最终只是扔掉了 PHP 的默认 mac os 版本并使用了 Homebrews PHP 7.2 版本。 This solved my issues.这解决了我的问题。 By using Homebrews version you don't need to turn off csrutil.通过使用 Homebrews 版本,您无需关闭 csrutil。

Good reference for help with the install.帮助安装的好参考。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM