问题描述
升级到MacOS Mojave后,Apache无法再加载PHP扩展.任何扩展名,我都会在Apache日志中收到以下错误;苹果似乎在MacOS Mojave上通过Apache实现了库验证.这显然使用Apache加载未签名的二进制文件变得不可能.
After upgrade to MacOS Mojave, Apache can't load PHP extensions anymore. Any extension i get the error below on the Apache log ; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
是否有不涉及禁用MacOS的SIP的变通办法?
Is there any workaround that would not involve to disable MacOS' SIP ?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
推荐答案
在更新Mojave之后,我的iTunes库中的某些视频文件出现问题,该文件需要第三方音频插件.它触发了完全相同的错误消息.我最终找到了一个非常简单的修复程序来禁用它. https://github.com/mologie/macos-disable-library-validation
I was having problems with certain video files in my iTunes library that required a third-party audio plugin after I updated Mojave. It was triggering the exact same error message. I eventually found an incredibly easy fix to disable it. https://github.com/mologie/macos-disable-library-validation
我只运行了它,一切正常,甚至不必重新启动.为了安全起见,我会自担风险,但希望它能起作用!
I just ran it and everything worked fine, didn't even have to reboot. I would use it at your own risk for security purposes, but hopefully it works!
这篇关于Apache无法在Mojave上加载PHP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!