简体   繁体   English

Apache无法在Mojave上加载PHP扩展

[英]Apache can't load PHP extensions on Mojave

After upgrade to MacOS Mojave, Apache can't load PHP extensions anymore. 升级到MacOS Mojave后,Apache无法再加载PHP扩展。 Any extension i get the error below on the Apache log ; 任何扩展名,我都会在Apache日志中收到以下错误; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. 苹果似乎在MacOS Mojave上通过Apache实现了库验证。 That makes it apparently impossible to load unsigned binaries with Apache. 这显然使得无法使用Apache加载未签名的二进制文件。

Is there any workaround that would not involve to disable MacOS' SIP ? 是否有任何不涉及禁用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

I was having problems with certain video files in my iTunes library that required a third-party audio plugin after I updated Mojave. 更新Mojave之后,我的iTunes库中的某些视频文件出现问题,需要第三方音频插件。 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 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! 为了安全起见,我会自担风险,但希望它能起作用!

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

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